SA-MP Forums Archive
Error help! - 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 help! (/showthread.php?tid=423317)



Error help! - [DX]Aru12345 - 17.03.2013

I get this error.
Код:
C:\Users\Shekhar\Downloads\Aryan\SAMP 0.3x Server\filterscripts\A2Admin.pwn(164) : error 035: argument type mismatch (argument 2)
C:\Users\Shekhar\Downloads\Aryan\SAMP 0.3x Server\filterscripts\A2Admin.pwn(167) : error 035: argument type mismatch (argument 2)
C:\Users\Shekhar\Downloads\Aryan\SAMP 0.3x Server\filterscripts\A2Admin.pwn(178) : error 035: argument type mismatch (argument 2)
Here is the code:
pawn Код:
CMD:setlevel(playerid,params[])
{
    new id,level;
    if(IsPlayerAdmin(playerid))
    {
        if(sscanf(params,"ud",id,level)) return SendClientMessage(playerid,COL_RED,"USAGE: /setlevel <Player ID> <Admin level>");//LINE 164. ERROR LINE    
        else
        {
            if(level > 7) return SendClientMessage(playerid, COL_RED, "USAGE: Choose a level betwen 0 and 7");//LINE 167. ERROR LINE    
            else
            {
                new INI:File = INI_Open(UserPath(id));
                INI_WriteInt(File,"Admin",level);
                INI_Close(File);
            }
        }
    }
    else
    {
        SendClientMessage(playerid,COL_RED,"You are not authorized to use this command");//LINE 178. ERROR LINE      
    }
    return 1;
}



Re: Error help! - IstuntmanI - 17.03.2013

COL_RED i'm sure it's defined as "{FF0000}", replace COL_RED with 0xFF0000FF.


Re: Error help! - [DX]Aru12345 - 17.03.2013

Quote:
Originally Posted by costel_nistor96
Посмотреть сообщение
COL_RED i'm sure it's defined as "{FF0000}", replace COL_RED with 0xFF0000FF.
Yeah it was. It worked. Thanks. REP+ from me