|
C:\Documents and Settings\xxxxxxxxx\My Documents\server\gamemodes\TEST.pwn(5730) : error 017: undefined symbol "YSI_gplayerS" C:\Documents and Settings\xxxxxxxxx\My Documents\server\gamemodes\TEST.pwn(5730) : error 017: undefined symbol "YSI_gplayerA" C:\Documents and Settings\xxxxxxxxx\My Documents\server\gamemodes\TEST.pwn(5730) : error 001: expected token: ";", but found "]" C:\Documents and Settings\xxxxxxxxx\My Documents\server\gamemodes\TEST.pwn(5730) : fatal error 107: too many error messages on one line |
|
stock RespawnNearbyVehicles(iPlayerID, Float: fRadius) { new Float , Float:y, Float:z;for( new i = 0; i < MAX_PLAYERS; i++ ) if(GetVehicleModel(i) && GetVehicleDistanceFromPoint(i, Float , Float:y, Float:z) <= fRadius) {foreach(player, i); if(GetPlayerVehicleID(x) == i); SetVehicleToRespawn(i); } return true; } |
stock RespawnNearbyVehicles(iPlayerID, Float: fRadius)
{
new Float: x, Float: y, Float: z;
foreach(new i : Player)
{
if(GetVehicleModel(i) && GetVehicleDistanceFromPoint(i, x, y, z) <= fRadius)
{
if(GetPlayerVehicleID(x) == i)
{
SetVehicleToRespawn(i);
}
}
}
return true;
}
|
pawn Код:
|
|
C:\Documents and Settings\xx\My Documents\server\gamemodes\TEST.pwn(5730) : error 017: undefined symbol "foreach" C:\Documents and Settings\xx\My Documents\server\gamemodes\TEST.pwn(5730) : error 029: invalid expression, assumed zero C:\Documents and Settings\xx\My Documents\server\gamemodes\TEST.pwn(5730) : error 017: undefined symbol "i" C:\Documents and Settings\xx\My Documents\server\gamemodes\TEST.pwn(5730) : fatal error 107: too many error messages on one line |
|
I have 4 more errors, however they're different ones from the before ones.
|
|
If you're getting foreach undefined, make sure you have the foreach include, as well as #include <foreach> where your includes are.
|
if(GetPlayerVehicleID(x) == i)
|
Also, I have noticed that
pawn Код:
What are you trying to accomplish doing that? |
CMD:respawncars(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] >= 2) {
if(isnull(params))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /respawncars [radius]");
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
return SendClientMessage(playerid, COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you
must be on-duty. Type /aduty to go on-duty.");
new string[128], radius = strval(params);
if((radius < 1 || radius > 40) && PlayerInfo[playerid][pAdmin] < 4)
return SendClientMessage(playerid, COLOR_WHITE, "Radius must be higher than 0 and lower than 31!");
RespawnNearbyVehicles(playerid, radius);
format(string, sizeof(string), "You have respawned all vehicles within a radius of %d.", radius);
SendClientMessage(playerid, COLOR_GREY, string);
} else SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
return true;
}