Veh problem - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Veh problem (
/showthread.php?tid=203216)
Veh problem -
Tessar - 26.12.2010
im having this argument problem
pawn Код:
format(string,sizeof(string),"%s",GetVehicleModelIDFromName(vehicleid));
then the GetVehicleIDFromName is:
pawn Код:
GetVehicleModelIDFromName(vname[])
{
for(new i = 0; i < 211; i++)
{
if(strfind(aVehicleNames[i], vname, true) != -1)
return i + 400;
}
return -1;
}
Quote:
error 035: argument type mismatch (argument 1)
1 Error.
|
Re: Veh problem -
Calgon - 26.12.2010
According to your function, you have to insert the name to get the ID. You're trying to do the opposite, you're trying to insert the ID to get a name which isn't going to work.
Re: Veh problem -
Tessar - 26.12.2010
Quote:
Originally Posted by Calgon
According to your function, you have to insert the name to get the ID. You're trying to do the opposite, you're trying to insert the ID to get a name which isn't going to work.
|
Isnt there anyway i can retrieve from it?
Re: Veh problem -
Lorenc_ - 26.12.2010
format(string,sizeof(string),"%s",GetVehicleModelI DFromName(vehicleid));
Whats this ment to do? get the model id? Your better off maybe trying:
pawn Код:
format(string,sizeof(string),"%s",vehicleid);
I suppose. check the format character if it dont show the numbers...