SA-MP Forums Archive
error 035: argument type mismatch (argument 2) - 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)
+--- Thread: error 035: argument type mismatch (argument 2) (/showthread.php?tid=371005)



error 035: argument type mismatch (argument 2) - [p3]pr0t0typ3 - 22.08.2012

I am making a admin script with SII,zcmd and sscanf.

Im trying to make a setlevel command but i keep getting the error in thread title.Im not a total noob but im new to making inis and admin commans.

Код:
CMD:promote(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
    return 1;
    }
    else SendClientMessage(playerid, RED,"[pr0adm]You must be level 5 to set a players level.");
    return 1;
}
I know this is probably very wrong but its the closest i could get to a decent admin command.Any help for this would be very appreciated as always


Re: error 035: argument type mismatch (argument 2) - Ballu Miaa - 22.08.2012

That command returns 1 or that SendClientMessage. Nothing else.

To fix command. Here ya go
pawn Код:
CMD:promote(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
        return 1; // Add whatever your code u want here.
    }
    else return SendClientMessage(playerid, RED,"[pr0adm]You must be level 5 to set a players level.");
    return 1;
}