error 035: argument type mismatch
#1

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!
Reply
#2

You're trying to store a str into a int, so try: new veh[20] instead
Reply
#3

Ah thanks
Never knew you had to put [##] behind the variable aswell. Thought just in the sscanf line was enough
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)