SendToAdmins Stock has a parameter problem
#1

So i been trying all day to make a /a command but it returns
Код:
sscanf warning: Format specifier does not match parameter count.
So here's the two codes.

Command:

Код:
CMD:a(playerid,params[]){
    new string[128];
    if(PlayerInfo[playerid][pAdminLevel] <= 1) return SendClientMessage(playerid,COLOR_GREY,"You're not authorized to use this command!");
    if(sscanf(params, "us")) return SendClientMessage(playerid,COLOR_GREY,"SYNTAX: /a(dmin) [message]");
    else
    {
    format(string,sizeof(string),"%s: %d",GetName(playerid), params);
    SendToAdmins(COLOR_RED, string);
    }
    return 1;
}
Stock

Код:
stock SendToAdmins(COLOR,message[])//here we set params for this stock, [] means string/message
{
    for( new i = 0; i < MAX_PLAYERS; i++ )
    if( PlayerInfo[i][pAdminLevel] <= 1 )
    {
        SendClientMessage( i,COLOR,message );
    }
    return 0; //for everyone else return 0;
}
Now i have tried changing the "us" to "u"
Reply


Messages In This Thread
SendToAdmins Stock has a parameter problem - by Cole_William - 11.07.2014, 20:44
Re: SendToAdmins Stock has a parameter problem - by SHE790 - 11.07.2014, 20:54
Re: SendToAdmins Stock has a parameter problem - by Cole_William - 11.07.2014, 21:01
Re : SendToAdmins Stock has a parameter problem - by Clad - 11.07.2014, 21:03
Re: Re : SendToAdmins Stock has a parameter problem - by SHE790 - 11.07.2014, 21:06
Re: SendToAdmins Stock has a parameter problem - by kizla - 11.07.2014, 21:15
Re: SendToAdmins Stock has a parameter problem - by Cole_William - 11.07.2014, 21:17

Forum Jump:


Users browsing this thread: 1 Guest(s)