SA-MP Forums Archive
[Help] +1 rep sscanf warning: No default value found. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] +1 rep sscanf warning: No default value found. (/showthread.php?tid=361016)



[Help] +1 rep sscanf warning: No default value found. - THE_KING$5$ - 19.07.2012

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.


Re: [Help] +1 rep sscanf warning: No default value found. - tyler12 - 19.07.2012

Did u give the strings a lenght?

new bla[64];


Re: [Help] +1 rep sscanf warning: No default value found. - nepstep - 19.07.2012

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


Re: [Help] +1 rep sscanf warning: No default value found. - THE_KING$5$ - 31.07.2012

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);


Re: [Help] +1 rep sscanf warning: No default value found. - [MM]RoXoR[FS] - 31.07.2012

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.


Re: [Help] +1 rep sscanf warning: No default value found. - THE_KING$5$ - 31.07.2012

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


Re: [Help] +1 rep sscanf warning: No default value found. - [MM]RoXoR[FS] - 31.07.2012

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



Re: [Help] +1 rep sscanf warning: No default value found. - THE_KING$5$ - 31.07.2012

Worked Relly Thanks +1 Added.