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=503341)
error 017: undefined symbol "i" -
Mriss - 29.03.2014
help
Код:
Millenium.pwn(140) : error 017: undefined symbol "i"
Line 140
pawn Код:
for(new i = 0; i < 4; i++) format(strLoc, sizeof(strLoc), "Loc%d", i), INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
Whole public
pawn Код:
public LoadVehicleData(vehicleID, name[], value[])
{
new strLoc[8];
INI_Int("model", VehicleInfo[vehicleID][vModel]);
for(new i = 0; i < 4; i++) format(strLoc, sizeof(strLoc), "Loc%d", i), INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
INI_Int("color1", VehicleInfo[vehicleID][vColor1]);
INI_Int("color2", VehicleInfo[vehicleID][vColor2]);
INI_Int("respawn", VehicleInfo[vehicleID][vRespawn]);
INI_String("owner", VehicleInfo[vehicleID][vOwner], MAX_PLAYER_NAME);
VehicleInfo[vehicleID][vLocked] = INI_Int("locked") == 1 ? true : false;
return 1;
}
Re: error 017: undefined symbol "i" -
nGen.SoNNy - 29.03.2014
Did you tried to change the "i" into "x" ?
Re: error 017: undefined symbol "i" -
Mriss - 29.03.2014
to this>
pawn Код:
for(new x = 0; x < 4; x++) format(strLoc, sizeof(strLoc), "Loc%d", x), INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
?
Re: error 017: undefined symbol "i" -
Mriss - 29.03.2014
Millenium.pwn(140) : error 017: undefined symbol "x"
Re: error 017: undefined symbol "i" -
iThePunisher - 29.03.2014
Mriss change the i To playerid
try it
Re: error 017: undefined symbol "i" -
vassilis - 29.03.2014
Quote:
Originally Posted by iThePunisher
Mriss change the i To playerid
try it
|
Why to do that..? he is using loop
Re: error 017: undefined symbol "i" -
TomatoRage - 29.03.2014
try this
pawn Код:
for(new i = 0; i < 4; i++)
{
format(strLoc, sizeof(strLoc), "Loc%d", i);
INI_Float(strLoc, VehicleInfo[vehicleID][vLoc][i]);
}