I need minor help!
#1

Today I am making my first IRC Command, and I'm getting warnings that I'm unsure of..

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;
}
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"
Reply
#2

I believe you will have to use format. Here's an example:
Code:
format(string,sizeof(string),"2Name: %s",PlayerName(endid));
IRC_Notice(botid,user,string);
And just repeat this with all lines
Reply
#3

too slow
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)