sscanf Warning in Log ?

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • [00:40:14] sscanf warning: 'z' is deprecated, consider using 'S' instead.
    [00:40:14] sscanf warning: No default value found.
    [00:40:14] sscanf warning: Strings without a length are deprecated, please add a destination size.
    [00:40:21] sscanf warning: 'z' is deprecated, consider using 'S' instead.
    [00:40:21] sscanf warning: No default value found.
    [00:40:21] sscanf warning: Strings without a length are deprecated, please add a destination size.


    Was bedeutet das ?

  • ocmd:permaban(playerid,params[])
    {
    new year, month, day, string[128], sendername[MAX_PLAYER_NAME], sendername2[MAX_PLAYER_NAME];
    new pID,grund[30];
    if(sscanf(params,"us",pID,grund)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /permaban [playerid/PartOfName] [grund]");
    if (PlayerInfo[playerid][pAdmin] >= 4)
    {
    if(IsPlayerConnected(pID) && pID != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(pID, sendername2, sizeof(sendername2));


    getdate(year, month, day);
    format(string, sizeof(string), "[ADMIN]: %s was Permabanned by %s, reason: %s (%d-%d-%d)", sendername2, sendername, grund,month,day,year);
    BanLog(string);
    format(string, sizeof(string), "[ADMIN]: %s was Permabanned by %s, reason: %s", sendername2, sendername, grund);
    SendClientMessageToAll(COLOR_LIGHTRED, string);
    PlayerInfo[pID][pLevel] = -999;


    new ipaddress[16];
    GetPlayerIp(pID,ipaddress,sizeof(ipaddress));
    new BannedReason[126];
    format(BannedReason, sizeof(BannedReason), "PermaBanned. Reason: %s", grund); //<- Wofür soll das sein? 1. Brauchst du keinen weiteren string erstellen, 2. formatierst du ihn aber benutzt ihn nie.
    SendClientMessage(playerid, COLOR_GREY, BannedReason);
    //Ban(pID);
    //Kick(pID);
    return 1;
    }
    else
    {
    format(string, sizeof(string), " %d is not an active player.", pID);
    SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    }
    return 1;
    }



    [00:52:28] sscanf warning: Strings without a length are deprecated, please add a destination size.


    dieser error noch da ...