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

Hey Hello Guys. I got Some Problem with my Gamemode i get these error or something else on my Server Consol

Code:
[00:42:29] [MYSQL]: Connection to `myserver` succesful!
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
[00:42:29] sscanf warning: No default value found.
The GM Compline Good no Error Except This On Server consol
and i cant even know that where is this errors coming from.

Please help me how to Fix This?i will give you reputation.


Sorry For my English.
Reply
#2

Did u give the strings a lenght?

new bla[64];
Reply
#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
#4

i didnt under stand but my my error is now only
"sscanf warning: Strings without a length are deprecated, please add a destination size."
and i uses sscanf please look at this line

sscanf(line, "p<|>s[256]s[30]ds[64]s[64]dds[30]s[64]s[64]",mydatasblaba,...);and this

sscanf(Str, "p<|>iffffddd", dModel, VX, VY, VZ, VA, VID, VC1, VC2);
Reply
#5

Quote:
Originally Posted by THE_KING$5$
View Post
i didnt under stand but my my error is now only
"sscanf warning: Strings without a length are deprecated, please add a destination size."
and i uses sscanf please look at this line

sscanf(line, "p<|>s[256]s[30]ds[64]s[64]dds[30]s[64]s[64]",mydatasblaba,...);and this

sscanf(Str, "p<|>iffffddd", dModel, VX, VY, VZ, VA, VID, VC1, VC2);
Show full code where you are having error.
Reply
#6

i think in this line
sscanf(line, "p<|>ssddddssssssdddddffffssdddddddd", data[0], data[1]ETC....);
Reply
#7

If you want sscanf to unformat just one char do
pawn Code:
sscanf(line, "p<|>s[1]s[1]dddds[1]s[1]s[1]s[1]s[1]s[1]dddddffffs[1]s[1]dddddddd", data[0], data[1]ETC....);
In [] , you enter the size of string, since you are passing just one char (data[0] is first char of data string)
so, you must do s[1]

If your string is , for example

pawn Code:
new string[100];
//U must do like
sscanf(line,"s[100]",string)//for full string
sscanf(lline,"s[1]",string[0])//for just one character
Reply
#8

Worked Relly Thanks +1 Added.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)