sscanf warning.
#1

I have made a chat system, it all works but in server logs it shows a warning with sscanf but I have not used any of the symbols in the warning:
Quote:

[12:13:30] sscanf warning: sscanf specifiers do not require '' before them.

Rep given to problem solver.

pawn Код:
CMD:g(playerid, params[])
{
    new str[150], text[128];
    if(sscanf(params, "%s[128]", text)) return SCM(playerid, -1, "Usage: /g <text>");
    format(str, sizeof(str), "["GREEN"Global"WHITE"] "GREY"%s "WHITE"("GREY"%i"WHITE"): %s", GetName(playerid), playerid, text);
    SendClientMessageToAll(COLOR_WHITE, str);
    return 1;
}
Reply
#2

pawn Код:
if(sscanf(params, "%s[128]", text)) return SCM(playerid, -1, "Usage: /g <text>");
You placed an additional '%'. This is how you do it right:
pawn Код:
if(sscanf(params, "s[128]", text)) return SCM(playerid, -1, "Usage: /g <text>");
Reply
#3

Thanks, it worked, +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)