HELP ME :[
#1

[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.
[13:44:32] sscanf warning: String buffer overflow.

http://pastebin.com/twD1hvZ9
Full gm: http://pastebin.com/8FQ7Rv8m
Reply
#2

As shown in ******' sscanf tutorial/thread, he explains these kind of errors.

"sscanf warning: String buffer overflow.

This error comes up when people try and put too much data in to a string. For example:

pawn Код:
new str[10];
sscanf("Hello there, how are you?", "s[10]", str);
That code will try and put the string "Hello there, how are you?" in to the variable called "str". However, "str" is only 10 cells big and can thus only hold the string "Hello ther" (with a NULL terminator). In this case, the rest of the data is ignored - which could be good or bad:

pawn Код:
new str[10], num;
sscanf("Hello there you|42", "p<|>s[10]i", str, num);
In this case "num" is still correctly set to "42", but the warning is given for lost data ("e you").

Currently there is nothing you can do about this from a programming side (you can't even detect it - that is a problem I intend to address), as long as you specify how much data a user should enter this will simply discard the excess, or make the destination variable large enough to handle all cases."

https://sampforum.blast.hk/showthread.php?tid=120356

EDIT: If this doesn't work for you, make sure you're using the latest version of sscanf.
Replace
pawn Код:
#include <sscanf>
with
pawn Код:
#include <sscanf2>
after updating.
Reply
#3

i try this and nothing..

EDIT:

i using new sscanf version and

#include <sscanf2> replaced..
Reply
#4

What the "line" contains?
Reply
#5

http://pastebin.com/twD1hvZ9
Reply
#6

This is not what I've asked for. I'm asking again, what the "line" contains? and how did you defined it (the array)
pawn Код:
while(fread(map, line))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)