01.08.2013, 09:29
Today I am making my first IRC Command, and I'm getting warnings that I'm unsure of..
The warnings are:
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
I've marked where the warnings are coming from with "// This line"
pawn Code:
IRCCMD:playerinfo(botid, channel[], user[], host[], params[])
{
if(IRC_IsHalfop(botid, channel, user))
{
new string[128];
new endid;
if(sscanf(params, "u", endid))
{
format(string, sizeof(string),"USAGE: !playerinfo [Player ID]");
Say(channel,string);
return 1;
}
if(endid == INVALID_PLAYER_ID) endid = strval(params);
if(!IsPlayerConnected(endid))
{
format(string, sizeof(string),"2ERROR: \2;%d\2; is not an active ID.", endid);
Say(channel,string);
return 1;
}
IRC_Notice(botid, user,"2PLAYER INFO:");
IRC_Notice(botid, user,"2Name: %s",PlayerName(endid)); // This line
IRC_Notice(botid, user,"2Score: %d",GetPlayerScore(endid)); // This line
IRC_Notice(botid, user,"2Money: %d",GetPlayerMoney(endid)); // This line
}
return 1;
}
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
I've marked where the warnings are coming from with "// This line"