[Help] +1 rep sscanf warning: No default value found.
#3

Strings without length means that you are not defining the strings length at the sscanf for example this will bring a warning:
if(sscanf(params, "us", giveplayerid, reason))
when this won't bring one:
if(sscanf(params, "us[64]", giveplayerid, reason))
and about the "No default value" warning it means that when you are asking for an optional value and its not given it will return an error.
Example of a sscanf that will bring warning:
if(sscanf(params, "uS[64]", giveplayerid, optionalvalue)) where optionalvalue is not required
and example of a good one without warning:
if(sscanf(params, "uS[64](default optional value)", giveplayerid, optionalvalue)) this will set optional value to "default optional value" if its not given
where "64" is the strings size
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)