Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

SSCANF HELP

$
0
0
Code:

CMD:dann(playerid, params[])
{
        AdminLevel(playerid,1)
        if(sscanf(params,"s",params)) return SM(playerid, "Použití: "r"/dann [ TEXT ]");
        if(strlen(params) > 100) return SM(playerid, "Mod dlouhý text");
        new string[111];
        TextDrawDiakritika(params);
        new ID;
        for(new i = 0; i < strlen(params); i++)
        {
                if(strfind(params[i], "~", true) == 0)
                {
                    ID ++;
                }
        }
        if((ID % 2) != 0) return SM(playerid,"Máte špatně napsané barvy ("g"~"w") v textu");
        format(string, sizeof(string), "~w~%s", params);
        GameTextForAll(string, 10000, 1);
        return 1;
}

log warning :

Code:

sscanf warning: Strings without a length are deprecated, please add a destination size.
 sscanf warning: String buffer overflow.


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>