SA-MP Forums Archive
Need help +rep Pls - 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: Need help +rep Pls (/showthread.php?tid=407449)



Need help +rep Pls - sscarface - 13.01.2013

Код:
C:\Users\Nouman\Documents\gf1.pwn(1568) : error 017: undefined symbol "VehicleNames"
C:\Users\Nouman\Documents\gf1.pwn(1568) : error 036: empty statement
C:\Users\Nouman\Documents\gf1.pwn(1568) : error 017: undefined symbol "i"
C:\Users\Nouman\Documents\gf1.pwn(1568) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Quote:

stock GetVehicleModelIDFromName(const vname[])
{
for(new i=0; i < sizeof(VehicleNames); i++)
{
if(strfind(VehicleNames[i], vname, true) != -1) return i + 400;
}
return -1;
}




Re: Need help +rep Pls - sscarface - 13.01.2013

help pls?


Re: Need help +rep Pls - Scenario - 13.01.2013

read pls?


Re: Need help +rep Pls - sscarface - 13.01.2013

Sorry ok thanks.


Re: Need help +rep Pls - martin3644 - 13.01.2013

Код:
stock GetVehicleModelIDFromName(const vname[])
{
for(new i=0; i < sizeof(VehicleNames); i++)
{
if(strfind(VehicleNames[i], vname, true) != -1) return i + 400;
}
return -1;
}
On top type:

new i;

Like that:

Код:
new i;
stock GetVehicleModelIDFromName(const vname[])
{
for(new i=0; i < sizeof(VehicleNames); i++)
{
if(strfind(VehicleNames[i], vname, true) != -1) return i + 400;
}
return -1;
}
On witch callback is this error 017: undefined symbol "VehicleNames"