error 017: undefined symbol "i - 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: error 017: undefined symbol "i (
/showthread.php?tid=424878)
error 017: undefined symbol "i -
Yves - 24.03.2013
Never mind i fixed it! should have done that before posting sorry
Something wrong when i was translateing my script to zcmd cos its faster am getting this gay error for some reason can anyone help thank you
Код:
(1312) : warning 208: function with tag result used before definition, forcing reparse
(1303) : error 017: undefined symbol "gSAZones"
(1303) : error 036: empty statement
(1303) : error 017: undefined symbol "i"
(1303) : fatal error 107: too many error messages on one line
Код:
stock Get2DZone(zone[], len, Float:x, Float:y, Float:z)
{
#pragma unused 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]);
}
}
return format(zone, len, "San Andreas");
}
Re: error 017: undefined symbol "i -
Glad2BeHere - 24.03.2013
Here u go
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;
}