27.03.2014, 10:10
sscanf warning: Format specifier does not match parameter count.
It has something to do with the loading stats
Anyone that can help?
Will +Rep
Here is the code:
It has something to do with the loading stats
Anyone that can help?
Will +Rep
Quote:
[11:53:45] Incoming connection: 127.0.0.1:49866 [11:53:45] [join] Jason_Smith has joined the server (0:127.0.0.1) [11:53:51] sscanf warning: String buffer overflow. [11:53:51] sscanf warning: Format specifier does not match parameter count. [11:53:51] Loaded [11:53:51] Loaded 2 [11:53:58] Player Saved [11:53:58] [part] Jason_Smith has left the server (0:1) |
Код:
stock LoadStats(playerid) { new Query[2048]; format(Query, sizeof(Query), "SELECT * FROM playerdata WHERE Name = '%s'", GetName(playerid)); mysql_query(Query); mysql_store_result(); mysql_fetch_row_format(Query, "|"); sscanf(Query, "e<p<|>s[23]s[24]dddddfffdddddd>", PlayerInfo[playerid][Name], PlayerInfo[playerid][Password], PlayerInfo[playerid][Cash], PlayerInfo[playerid][Bank], PlayerInfo[playerid][PH], PlayerInfo[playerid][Level], PlayerInfo[playerid][Skin], PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosY], PlayerInfo[playerid][PosZ], PlayerInfo[playerid][Int], PlayerInfo[playerid][VW], PlayerInfo[playerid][Job], PlayerInfo[playerid][Job2], PlayerInfo[playerid][Jail], PlayerInfo[playerid][Bail]); print("Loaded"); mysql_free_result(); format(Query, sizeof(Query), "SELECT * FROM playerdata WHERE Name = '%s'", GetName(playerid)); mysql_query(Query); mysql_store_result(); mysql_fetch_row_format(Query, "|"); sscanf(Query, "e<p<|>dddddddddd>", PlayerInfo[playerid][Faction], PlayerInfo[playerid][FacRank], PlayerInfo[playerid][Phone], PlayerInfo[playerid][Mats], PlayerInfo[playerid][Pot], PlayerInfo[playerid][Crack], PlayerInfo[playerid][Heroin], PlayerInfo[playerid][VIPLevel], PlayerInfo[playerid][Moderator], PlayerInfo[playerid][Admin]); print("Loaded 2"); mysql_free_result(); return 1; }