Veh problem
#1

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.

Reply
#2

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.
Reply
#3

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?
Reply
#4

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...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)