SA-MP Forums Archive
sscanf warning: Format specifier does not match parameter count. - 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: sscanf warning: Format specifier does not match parameter count. (/showthread.php?tid=561061)



sscanf warning: Format specifier does not match parameter count. - Jihanz - 01.02.2015

Help Me Please



Respuesta: sscanf warning: Format specifier does not match parameter count. - Zume - 01.02.2015

the same warning says the error .. Code?


Re: sscanf warning: Format specifier does not match parameter count. - Jihanz - 01.02.2015

Код:
CMD:givecash(playerid, params[])
{
    new player, amount,name1[24], name2[24], string[128];
    if(PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid,COLOR_RED,"[ERROR]Kamu Bukan Admin!");
    if(!sscanf(params, "ui",player,amount))
    {
        GetPlayerName(playerid, name1, 24);
        GetPlayerName(player, name2, 24);
        format(string, sizeof(string), "{3BF5C6}[INFO]{B30222} - Kamu Menerima $%d ke %s.",amount,name2);
        SendClientMessage(playerid, 0xFFFF00FF, string);
        format(string, sizeof(string), "{3BF5C6}AdmCmd: {B30222}Admin %s gave you $%d!", name1, amount);
        SendClientMessage(player, 0xFFFF00FF, string);
        GivePlayerMoney(player, amount);
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF,"{3BF5C6}[USE]{B30222}: /givecash [Player ID] [Cash]");
    return 1;
}



Re: sscanf warning: Format specifier does not match parameter count. - AdamsP - 01.02.2015

if(!sscanf(params, "ui[128]",player,amount))
{


Re: sscanf warning: Format specifier does not match parameter count. - Ironboy - 01.02.2015

This command doesn't hold any string characters, so it must be some other command or function which gives this warning.