07.06.2011, 23:04
Hi. ![smiley](images/smilies/smile.gif)
I've got this MySQL script, and I'm having some problems with it.
As soon as I enter /login password, it prints "sscanf string overflow." into the server console. It does however authenticate it, but doesn't load any stats.
I understood that it's because it's somehow receiving more information than it is actually set to receive. I don't know why though, this is basically it:
I have a global array on top of the script (Query), which is 1024cells long.
Why is my script doing this?
![smiley](images/smilies/smile.gif)
I've got this MySQL script, and I'm having some problems with it.
As soon as I enter /login password, it prints "sscanf string overflow." into the server console. It does however authenticate it, but doesn't load any stats.
I understood that it's because it's somehow receiving more information than it is actually set to receive. I don't know why though, this is basically it:
pawn Код:
new
values[5];
sscanf(Query, "p<|>{s[24]s[129]s[16]}a<i>[5]", values); // s[24] = Playername. [s129] whirlpool pass s[16] IP, and <i> [5] = listed under this.
gPlayerInfo[playerid][pAdmin] = values[0];
GivePlayerMoney(playerid, values[1]);
SetPlayerScore(playerid, values[2]);
gPlayerInfo[playerid][pLevel] = values[3];
gPlayerInfo[playerid][pPoints] = values[4];
gPlayerInfo[playerid][pLoggedIn] = true;
SendClientMessage(playerid, COLOR_GREEN, "** [INFO] You have succesfully authenticated. Your stats have been loaded.");
PlayerPlaySound(playerid, 1056, playerid, playerid, playerid);
Why is my script doing this?
![Sad](images/smilies/sad.gif)