SA-MP Forums Archive
help ? doesn't make any sense - 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 ? doesn't make any sense (/showthread.php?tid=422424)



help ? doesn't make any sense - thistooshallpass93 - 13.03.2013

So it appears that I am getting an argument type error which doesn't make any sense what so ever. I have looked over this code millions of times and it really doesn't make any sense.

PHP код:
CMD:admincommands(playeridparams[])
{
        if(
PlayerInfo[playerid][pAdmin] == 1)
        {
            
SendClientMessage(playeridCOLOR_RED"======== Moderator Commands ========");
            
SendClientMessage(playeridCOLOR_WHITE"/kick /mute /unmute /kick");
        }
        if(
PlayerInfo[playerid][pAdmin] == 2)
        {
            
SendClientMessage(playeridCOLOR_RED,     "======== Administrator Commands ======== ");
            
SendClientMessage(playeridCOLOR_WHITE,  "/asay, /ban, /giveweapon, /disarm, /spawn, /givemoney, /sethealth, /setarmour ");
            
SendClientMessage(playeridCOLOR_WHITE,  "/refill /healall /goto /get /healall, /armourall ");
        }
        if(
PlayerInfo[playerid][pAdmin] == 3)
        {
            
SendClientMessage(playeridCOLOR_RED,     "======== Management Commands ========");
            
SendClientMessage(playeridCOLOR_WHITE,  "/setlevel /setvip /nukeall /kickall /unbanip /banip");
        }
        return 
1;

ERROR:
PHP код:
I:\pawno\gamemodes\sk4kcnr.pwn(141) : error 035argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(142) : error 035argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(146) : error 035argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(147) : error 035argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(148) : error 035argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(152) : error 035argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(153) : error 035argument type mismatch (argument 2)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
Any ideas?


Re: help ? doesn't make any sense - Babul - 13.03.2013

hm.. it looks like your color defines are somehow screwed... i guess they should look like
pawn Код:
#define COLOR_RED 0xff000000
#define COLOR_WHITE 0xffffff00



Re: help ? doesn't make any sense - thistooshallpass93 - 14.03.2013

Thanks, mate. That fixed it. +rep