13.10.2014, 17:31
Why is "else" marked as an invlaid expression ?
PHP код:
(23530) : error 029: invalid expression, assumed zero
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(g_var[playerid] == 0 && IsPlayerInRangeOfPoint(playerid, 5, 2789.6619, -2517.8105, 16.1509))
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle.");
{
>>>>> else
{
DisablePlayerCheckpoint(playerid);
new vehicleid = GetPlayerVehicleID(playerid);
new string[128], amount;
amount = 100+random(300);
format(string, sizeof(string), "*You've earned {FF6347}$%d{33CCFF} from dropping a car!", amount);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GiveDodMoney(playerid, amount);
SetVehicleToRespawn(vehicleid);
g_var[playerid] = 1;
SetTimerEx("CountDown",1200*1000, false, "d", playerid);
}
}
}