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(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SendClientMessage(playerid, COLOR_RED, "======== Moderator Commands ========");
SendClientMessage(playerid, COLOR_WHITE, "/kick /mute /unmute /kick");
}
if(PlayerInfo[playerid][pAdmin] == 2)
{
SendClientMessage(playerid, COLOR_RED, "======== Administrator Commands ======== ");
SendClientMessage(playerid, COLOR_WHITE, "/asay, /ban, /giveweapon, /disarm, /spawn, /givemoney, /sethealth, /setarmour ");
SendClientMessage(playerid, COLOR_WHITE, "/refill /healall /goto /get /healall, /armourall ");
}
if(PlayerInfo[playerid][pAdmin] == 3)
{
SendClientMessage(playerid, COLOR_RED, "======== Management Commands ========");
SendClientMessage(playerid, COLOR_WHITE, "/setlevel /setvip /nukeall /kickall /unbanip /banip");
}
return 1;
}
ERROR:
PHP код:
I:\pawno\gamemodes\sk4kcnr.pwn(141) : error 035: argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(142) : error 035: argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(146) : error 035: argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(147) : error 035: argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(148) : error 035: argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(152) : error 035: argument type mismatch (argument 2)
I:\pawno\gamemodes\sk4kcnr.pwn(153) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB 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