Argument Type Mismatch
#1

Y'all probably think i'm a dumbass for not figuring this out, and requiring help with something soo simple. Well, you're probably right xD (I stopped coding for a while and lost quite a bit of it, IE the reason for all the help threads recently, oh well :P)

On topic, I got an argument type mismatch to set the enum value for my vehicles.

pawn Код:
CMD:vowner(playerid, params[])
    {
    if(PlayerInfo[playerid][pAdmin] >=4)
        {
        new vehicleid, opid[30];
        if(sscanf(params, "dd", vehicleid, opid))
            {
            UsageMessage(playerid, "/vowner [vehicleid] [playerid]");
            return 1;
            }
        else
            {
            new string[30];
            new name[30];
            GetPlayerName(opid, name, sizeof(name));
            format(string, sizeof(string), "%s", name); //ERROR IS THIS LINE!
            VehicleInfo[vehicleid][vOwner] = string;
            SCM(pid, COLGREEN, "Server: {F0F0F0}You have set the owner of this vehicle.");
            return 1;
            }
        }
    return 1;
    }
It works if I use the stock I created, GetName(playerid) (which also removes the _ from the name)...But if I try GetName(opid) I get the error.
Reply


Messages In This Thread
Argument Type Mismatch - by Mattakil - 30.09.2013, 22:52
Re: Argument Type Mismatch - by bensmart469 - 30.09.2013, 23:03
Re: Argument Type Mismatch - by Mattakil - 30.09.2013, 23:14

Forum Jump:


Users browsing this thread: 2 Guest(s)