Empty statement? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Empty statement? (
/showthread.php?tid=328719)
Empty statement? -
justsomeguy - 25.03.2012
Hello, I have a problem with my script, I get these errors:
Код:
C:\Users\brian\Desktop\GTA San Andreas\gamemodes\Freeroam.pwn(77) : error 017: undefined symbol "gSAZones"
C:\Users\brian\Desktop\GTA San Andreas\gamemodes\Freeroam.pwn(77) : error 036: empty statement
C:\Users\brian\Desktop\GTA San Andreas\gamemodes\Freeroam.pwn(77) : error 017: undefined symbol "i"
C:\Users\brian\Desktop\GTA San Andreas\gamemodes\Freeroam.pwn(77) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
At these lines:
pawn Код:
stock GetPlayer2DZone(playerid, zone[], len)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i != sizeof(gSAZones); i++ )
{
if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
{
return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
}
}
return 0;
}
I can't seem to find the problem, does anyone might know what to do?
Thanks in advance.
Re: Empty statement? -
ReneG - 25.03.2012
You are not using format correctly? You are not inserting specifiers, and you are not assigning them. You shouldn't return a value in a loop as well.