04.08.2010, 14:55
Since I'm fairly new to loops, I wanted to make a /vrespawn that respawns all unoccupied vehicles.
Here is the code:
Errors:
Could someone tell me what I've done wrong?
Here is the code:
pawn Код:
dcmd_vrespawn(playerid,params[])
{
#pragma unused params
if(pi[playerid][admin] <= 0) return 0;
if(sscanf(params,"u"))
{
for(new 1 = 0; i < MAX_VEHICLES; i++)
{
SendClientMessageToAll(COLOUR_YELLOW,"All unoccupied vehicles has been respawned");
SetVehicleToRespawn(i);
return 1;
}
return 1;
}
Код:
C:\GTASER~1\GAMEMO~1\MyDm.pwn(1860) : error 001: expected token: "-identifier-", but found "-integer value-" C:\GTASER~1\GAMEMO~1\MyDm.pwn(1862) : error 008: must be a constant expression; assumed zero C:\GTASER~1\GAMEMO~1\MyDm.pwn(1863) : error 001: expected token: ")", but found ";" C:\GTASER~1\GAMEMO~1\MyDm.pwn(1863) : error 036: empty statement