SA-MP Forums Archive
error 017: undefined symbol "idx" - 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 "idx" (/showthread.php?tid=318635)



error 017: undefined symbol "idx" - ricardo178 - 15.02.2012

Hey guys. I am having this little problem with this.. I am trying to create LoadVehicles public.
This error show up:
Code:
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(391) : error 017: undefined symbol "idx"
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(392) : error 017: undefined symbol "idx"
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(393) : error 017: undefined symbol "idx"
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(394) : error 017: undefined symbol "idx"
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(395) : error 017: undefined symbol "idx"
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(396) : error 017: undefined symbol "idx"
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(397) : error 017: undefined symbol "idx"
C:\Users\user\Desktop\RRP\gamemodes\RRP.pwn(398) : error 017: undefined symbol "idx"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Errors.
In this code:
pawn Code:
forward LoadVehicles();
public LoadVehicles()
{
    for(new idx = 1; idx < sizeof(VehicleInfo[topnumber]) ; idx++)
    format(file, sizeof(file), "RRP/vehicles/%d.ini", idx);
    if(fexist(file))
    {
        CarInfo[idx][X] = dini_Int(file, "X");
        CarInfo[idx][Y] = dini_Int(file, "Y");
        CarInfo[idx][Z] = dini_Int(file, "Z");
        CarInfo[idx][Angle] = dini_Int(file, "Angle");
        CarInfo[idx][Color1] = dini_Int(file, "Color1");
        CarInfo[idx][Color2] = dini_Int(file, "Color2");
        CarInfo[idx][Model] = dini_Int(file, "Model");
        CarInfo[idx][Price] = dini_Int(file, "Price");
    }
    print("[RRP]: Vehicles Loadeds");
    return 1;
}



Re: error 017: undefined symbol "idx" - Jefff - 15.02.2012

After idx++) add { and close before print }


Re : error 017: undefined symbol "idx" - ricardo178 - 15.02.2012

God, i am so stupid. xD
Thank you very much.