for(new i = 0; i < MAX_PLAYERS; i++)
{
if(event(playerid)) == 1) continue; //if playerid has event = 1 they are in the race and stuff below applies to them
DisablePlayerCheckpoint(i);
SetPlayerVirtualWorld(playerid, 0);
SpawnPlayer(playerid);
FreezePlayerForTime(playerid, 3);
event[playerid] = 0;
}
if(event(i)) == 1) continue;
if(event(i)) == 1)
{
continue;
}
Try changing to :
pawn Код:
pawn Код:
|
for(new i = 0; i < MAX_PLAYERS; i++) { if(event[playerid] == 1) { //if playerid has event = 1 they are in the race and stuff below applies to them DisablePlayerCheckpoint(i); SetPlayerVirtualWorld(playerid, 0); SpawnPlayer(playerid); FreezePlayerForTime(playerid, 3); event[playerid] = 0; } } |
if(event(playerid)) == 1) //Remove the second bracket after 'playerid'. if(event(playerid) == 1)
You have an extra bracket in your if statement.
Код:
if(event(playerid)) == 1) //Remove the second bracket after 'playerid'. if(event(playerid) == 1) |
C:\Documents and Settings\Admin\Desktop\The Way of Life\gamemodes\WoL.pwn(16313) : error 012: invalid function call, not a valid address C:\Documents and Settings\Admin\Desktop\The Way of Life\gamemodes\WoL.pwn(16313) : warning 215: expression has no effect C:\Documents and Settings\Admin\Desktop\The Way of Life\gamemodes\WoL.pwn(16313) : error 001: expected token: ";", but found ")" C:\Documents and Settings\Admin\Desktop\The Way of Life\gamemodes\WoL.pwn(16313) : error 029: invalid expression, assumed zero C:\Documents and Settings\Admin\Desktop\The Way of Life\gamemodes\WoL.pwn(16313) : fatal error 107: too many error messages on one line
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(event(i) == 1) //if playerid has event = 1 they are in the race and stuff below applies to them
{
DisablePlayerCheckpoint(i);
SetPlayerVirtualWorld(i, 0);
SpawnPlayer(i);
FreezePlayerForTime(i, 3);
event[i] = 0;
}
else return 1;
}
No problem, sometimes I do that problem too.
It's I'm* btw . EDIT: You are wrong, It's if(event(playerid)) The "i" is correct, told him already. |