sscanf warning: Strings without a length are deprecated, please add a destination size.
#1

Help , how to fix?

Console: sscanf warning: Strings without a length are deprecated, please add a destination size.

Command: /ogetip

Code:
Код:
CMD:ogetip(playerid,params[])
{
	if(pInfo[playerid][pAdmin] == 0) return 0;

	new name2[24],msg[250];
 	if(sscanf(params, "s", name2))
		return SendClientMessage(playerid, COLOR_RED, "[Server]: Use: /ogetip < Full Name >");

    format(ipFILE, 64, "AKAIP/Users/Aliases/%s.txt", name2);

    if(!dini_Exists(ipFILE))
        return SendClientMessage(playerid, COLOR_GREY, "[Server]: This name can not be found!");

 	format(msg,sizeof(msg),"[Server] Check: IP: %s | Player: %s", name2, dini_Get("AKAIP/Users/Aliases/ips.txt",name2) );
	return SendClientMessage(playerid,COLOR_GREY,msg);

}
Reply
#2

It's here:
Код:
if(sscanf(params, "s", name2))
You need to add the size of the string.
Код:
if(sscanf(params, "s[23]", name2))
Reply
#3

thanks! dominik
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)