sscanf warning
#1

Hello,

I get this in my console :

Код:
[20:19:05] sscanf warning: No default value found.
[20:19:05] sscanf warning: Unknown format specifier '[', skipping.
[20:19:05] sscanf warning: Unknown format specifier '6', skipping.
[20:19:05] sscanf warning: Unknown format specifier '4', skipping.
[20:19:05] sscanf warning: Unknown format specifier ']', skipping.
[20:19:05] sscanf warning: Format specifier does not match parameter count.
This happens when i do my /ban command, the command works fine but i want to fix the warnings too!

Command :

pawn Код:
CMD:ban(playerid, params[])
{
    new ReAson[64];
    if(PlayerInfo[playerid][pAdmin] < 5)
        return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to be Level 5 to use this command!");
    else if(sscanf(params, "dS[64]", bID, ReAson))
        return SendClientMessage(playerid, COLOR_LIGHTRED, "Usage: /ban <playerid> <reason>");
    else if(bID == playerid)
        return SendClientMessage(playerid, COLOR_LIGHTRED, "You can't ban yourself!");
    else if(!IsPlayerConnected(bID))
        return SendClientMessage(playerid, COLOR_LIGHTRED, "Player not found!");
    else
    {
        new pName[24];
        new str[128];
        GetPlayerName(playerid, pName, 24);
        format(str, 128, "Adminstrator %s banned you! (Reason : %s)", pName, ReAson);
        SendClientMessage(bID, COLOR_ORANGE, str);
        new pNaMe[24];
        new rName[24];
        new sTr[128];
        GetPlayerName(playerid, pNaMe, 24);
        GetPlayerName(bID, rName, 24);
        format(sTr, 128, "Adminstrator %s banned %s! (Reason : %s)", pNaMe, rName, ReAson[0] ? ReAson : "No Reason Given");
        SendClientMessageToAll(COLOR_ORANGE, sTr);
        SetTimerEx("BanPlayer", 100, false, "i", playerid);
    }
    return 1;
}
BanPlayer Timer :

pawn Код:
forward BanPlayer(playerid);
public BanPlayer(playerid)
{
    Ban(bID);
    return 1;
}
Please help!
Reply


Messages In This Thread
sscanf warning - by SilverKiller - 29.03.2013, 16:58
Re: sscanf warning - by TomatoRage - 29.03.2013, 17:01
Re: sscanf warning - by SilverKiller - 29.03.2013, 17:06
Re: sscanf warning - by Djole1337 - 29.03.2013, 17:08
Re: sscanf warning - by SilverKiller - 29.03.2013, 17:11

Forum Jump:


Users browsing this thread: 2 Guest(s)