SA-MP Forums Archive
Warning [+REP] - 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: Warning [+REP] (/showthread.php?tid=332207)



Warning [+REP] - Tomer!.$ - 07.04.2012

PHP код:
warning 202number of arguments does not match definition 
The line:
PHP код:
YCMD:me(playeridparams[]) 
Whole function:
PHP код:
YCMD:me(playeridparams[])
{
    new 
string[128];
    if (
isnull(params))
    {
        
format(stringsizeof(string), "[USAGE:] /me [Action]");
        
SendClientMessage(playeridCOLOR_WHITEstring);
    }
    else
    {
    
format(stringsizeof(string), "* %s %s"GetName(playerid), params);
    
SendClientMessageToAll(0xFF0000AAstring);
    }
    return 
1
}


Re: Warning [+REP] - Hoss - 07.04.2012

Try this
pawn Код:
YCMD:me(playerid, params[], help)
{
    new string[128];
    if (isnull(params))
    {
        format(string, sizeof(string), "[USAGE:] /me [Action]");
        SendClientMessage(playerid, COLOR_WHITE, string);
    }
    else
    {
    format(string, sizeof(string), "* %s %s", GetName(playerid), params);
    SendClientMessageToAll(0xFF0000AA, string);
    }
    return 1;
}



Re: Warning [+REP] - antonio112 - 07.04.2012

It's:
pawn Код:
YCMD:me(playerid, params[], help)



Re: Warning [+REP] - Aira - 07.04.2012

ZCMD
PHP код:
CMD:me(playeridparams[])
{
    if(
isnull(params)) return SendClientMessageEx(playeridCOLOR_WHITE"USAGE: /me [Action]");
    new 
string[128];
    
format(stringsizeof(string), "* %s %s"GetPlayerNameEx(playerid), params);
    
ProxDetector(25.9playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 
1;

Which line has errorS?


Re: Warning [+REP] - Tomer!.$ - 07.04.2012

still has the same warning


Re: Warning [+REP] - IstuntmanI - 07.04.2012

Post again the command and say what's the line.


Re: Warning [+REP] - Tomer!.$ - 07.04.2012

I already showed you the specific line and the whole function..

Quote:
Originally Posted by Tomer!.$
Посмотреть сообщение
The line:
PHP код:
YCMD:me(playeridparams[]) 
Whole function:
PHP код:
YCMD:me(playeridparams[])
{
    new 
string[128];
    if (
isnull(params))
    {
        
format(stringsizeof(string), "[USAGE:] /me [Action]");
        
SendClientMessage(playeridCOLOR_WHITEstring);
    }
    else
    {
    
format(stringsizeof(string), "* %s %s"GetName(playerid), params);
    
SendClientMessageToAll(0xFF0000AAstring);
    }
    return 
1



Re: Warning [+REP] - Tomer!.$ - 07.04.2012

+REP to the one who solves it!


Re: Warning [+REP] - Tomer!.$ - 07.04.2012

Help?


Re: Warning [+REP] - antonio112 - 07.04.2012

Jesus, I already told you. If you use YCMD, you need the 'help' parameter too:

pawn Код:
YCMD:me(playerid, params[], help)
Is it that hard?