error 029: invalid expression, assumed zero |
else |
if(Ccp[playerid] == 1) { if(IsPlayerInAnyVehicle(playerid)) { if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 514 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 403 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) else SendClientMessage(playerid,COLOR_RED,"Jus turite buti sunkvezimyje"); } DisablePlayerCheckpoint(playerid); Ccp[playerid] = 2; SetPlayerCheckpoint(playerid,2784.6443,2585.3943,1 0.8203,3.0); SendClientMessage(playerid,COLOR_GREEN,"Kroviniai prikrauti. Vezkti i jusu tiksla"); return 1; } if(Ccp[playerid] == 2) { new reward,string[128]; DisablePlayerCheckpoint(playerid); Ccp[playerid] = 0; reward = GivePlayerMoney(playerid, GetPlayerMoney(playerid) + random(5000) + 1000); format(string,sizeof(string),"Jusu atlygis %iLt.", reward); SendClientMessage(playerid,COLOR_GOLD,string); } |
if(Ccp[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 514 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 403 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{ /* probably something is supposed to be here */}
else
SendClientMessage(playerid,COLOR_RED,"Jus turite buti sunkvezimyje");
}
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 2;
SetPlayerCheckpoint(playerid,2784.6443,2585.3943,1 0.8203,3.0);
SendClientMessage(playerid,COLOR_GREEN,"Kroviniai prikrauti. Vezkti i jusu tiksla");
return 1;
}
if(Ccp[playerid] == 2)
{
new reward,string[128];
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 0;
reward = GivePlayerMoney(playerid, GetPlayerMoney(playerid) + random(5000) + 1000);
format(string,sizeof(string),"Jusu atlygis %iLt.", reward);
SendClientMessage(playerid,COLOR_GOLD,string);
}
if(Ccp[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 514 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 403 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 2;
SetPlayerCheckpoint(playerid,2784.6443,2585.3943,1 0.8203,3.0);
SendClientMessage(playerid,COLOR_GREEN,"Kroviniai prikrauti. Vezkti i jusu tiksla");
return 1;
}
else return SendClientMessage(playerid,COLOR_RED,"Jus turite buti sunkvezimyje");
}
}
if(Ccp[playerid] == 2)
{
new reward,string[128];
DisablePlayerCheckpoint(playerid);
Ccp[playerid] = 0;
reward = GivePlayerMoney(playerid, GetPlayerMoney(playerid) + random(5000) + 1000);
format(string,sizeof(string),"Jusu atlygis %iLt.", reward);
SendClientMessage(playerid,COLOR_GOLD,string);
return 1;
}
There should be no IF statement after ELSE statement. That's why it's giving you the error / warning.
|
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 515 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 514 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || 403 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)//there should be something here like {} and then the else
else
The error is actually because the IF statement is empty and the next word is ELSE(exactly the opposite of yours message).
pawn Код:
|