Sscanf errors
#1

Im using Sscanf2 I get a bit of warnings on Console
CMD:

pawn Код:
IRCCMD:addarmy(botid, channel[], user[], host[], params[])
{
   
    if (IRC_IsAdmin(botid, channel, user))
    {
        new
            playerid,
            reason[64];

        if (sscanf(params, "ds", playerid, reason))
        {
            return 1;
        }
        if (IsPlayerConnected(playerid))
        {
            new
                msg[128],
                name[MAX_PLAYER_NAME];
            if (isnull(reason))
            {
                format(reason, sizeof(reason), "<no reason defined>");
            }
            if(PlayerInfo[playerid][IsArmy] == 1) {
            IRC_GroupSay(gGroupID, channel, "ERROR: This Player is already Army!"); }
            else {
            GetPlayerName(playerid, name, sizeof(name));
            format(msg, sizeof(msg), "02*** %s has been maded Army by %s on IRC. (%s)", name, user, reason);
            IRC_GroupSay(gGroupID, channel, msg);
            PlayerInfo[playerid][IsArmy] = 1;
            }


        }
    }

    return 1;
}
This is What i get in the console:

[21:56:19] sscanf warning: Strings without a length are deprecated, please add a destination size.
Reply
#2

pawn Код:
if (sscanf(params, "ds[64]", playerid, reason))
Reply
#3

Quote:
Originally Posted by blackwave
Посмотреть сообщение
pawn Код:
if (sscanf(params, "ds[64]", playerid, reason))
i need to check the strings? wow, never mind
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)