SA-MP Forums Archive
[HELP]argument type mismatch - 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: [HELP]argument type mismatch (/showthread.php?tid=478590)



[HELP]argument type mismatch - warlord321 - 30.11.2013

pawn Код:
D:\Game\RP\gamemodes\RP2.pwn(34256) : error 035: argument type mismatch (argument 2)
D:\Game\RP\gamemodes\RP2.pwn(34265) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
CMD:clearchat(playerid,params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        SendClientMessageEx(playerid,"CLEARCHAT"); //this line
        for(new i = 0; i < 11; i++) SendClientMessageToAll(COLOR_GREEN," "); return 1;
    } else return SendClientMessage(playerid,COLOR_RED,"ERROR: Kamu Harus Admin Level 4 Keatas");
}
CMD:clearallchat(playerid,params[])
{
    #pragma unused params
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
        SendClientMessageEx(playerid,"CLEARALLCHAT"); //this line
        for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_GREEN," "); return 1;
    } else return SendClientMessage(playerid,COLOR_RED,"ERROR: Kamu Harus Admin Level 4 Keatas");
}



Re: [HELP]argument type mismatch - Konstantinos - 30.11.2013

I don't know what parameters SendClientMessageEx uses but I'm sure you won't see the mesage because it sends 50 lines of the space in the chat.

Are you sure that you didn't want to log the command the player used? I believe you used another name instead of the correct one.


Re: [HELP]argument type mismatch - Avi Raj - 30.11.2013

Replace those with these
pawn Код:
SendClientMessageEx(playerid,0xFFFFFFAA,"CLEARCHAT");
SendClientMessageEx(playerid,0xFFFFFFAA,"CLEARCHATALL");



Re: [HELP]argument type mismatch - warlord321 - 30.11.2013

okay solved..