error 035: argument type mismatch - 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: error 035: argument type mismatch (
/showthread.php?tid=275869)
error 035: argument type mismatch -
Wesley221 - 11.08.2011
Hey guys,
Im trying to improve my vehicle spawner, but i got an error using sscanf.
Error line:
pawn Код:
new veh = GetVehicleModelID(Vehicle);
The variable "Vehicle" is from the sscanf line, which is:
pawn Код:
if(!sscanf(params, "s[50]", Vehicle))
Also, the "GetVehicleModelID is down here (not sure if you guys need it, but just in case):
pawn Код:
stock GetVehicleModelID(vehiclename[])
{
for(new i = 0; i < 211; i++)
{
if(strfind(aVehicleNames[i], vehiclename, true) != -1)
return i + 400;
}
return -1;
}
And ofcourse, the error line:
pawn Код:
#:\#\#\VehicleSpawner.pwn(89) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Thanks!
Re: error 035: argument type mismatch -
XGh0stz - 11.08.2011
You're trying to store a str into a int, so try: new veh[20] instead
Re: error 035: argument type mismatch -
Wesley221 - 11.08.2011
Ah thanks
Never knew you had to put [##] behind the variable aswell. Thought just in the sscanf line was enough