Empty statement?
#1

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.
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)