Server allways restarting or crashing, why?
#1

Server allways restarting or crashing!
More times it crashin and i see allways in log warnings with sscanf

Код:
 sscanf warning: Strings without a length are deprecated, please add a destination size.
i set lower the sizes of vars and set sizes like this

pawn Код:
if(sscanf(params,"s[MAX_STRING]",action))
i have then this

Код:
sscanf warning: Invalid data length.
[ sscanf warning: Invalid character in data length.
Still restarting why?

Who know reasons of crashes plese write them here!

And how to install this: https://sampforum.blast.hk/showthread.php?tid=262796
Reply
#2

Hmm, no idea.....

pawn Код:
#define MAX_STRING 1 // without brackets :\
if ( sscanf( params, "s["#MAX_STRING"]", action ) )
Or use the manual way...

pawn Код:
if ( sscanf( params, "s[256]", action ) )
Hope that helps!
Reply
#3

Hm i was had similar problem before. Well i was this situation:

pawn Код:
fnc(playerid,cells,...)
{
    new
        string[ sizeof (cells) ];
    format(string, sizeof string,.....
    return playerid;
}
So my advice would be to try with

[sizeof(cell)]

In your case ( if I understood your problem good )

pawn Код:
new
   MAX_STRING = sizeof(128);
if(sscanf(params,"s["MAX_STRING"]"))
Reply
#4

Why don't you go manual with it, like Basicz suggested? You'll save some resources on strings that doesn't have to be that big.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)