03.02.2013, 10:51
Hi everyone,
I've been struggling with this problem for a few months now, and I just can't solve it.
I use BlueG's MYSQL plugin, R6, because the others don't work very well for me.
Everything worked fine until I added date saving, but even if I remove it, it won't work.
Here's my loadstats code:
I rewrote the sscanf thing a few times, double checked if everything matched, but still, only the money works.
When I print the values, for example PInfo[playerid][Skin], it returns 0, while the debug log says it loaded id 240.
The thing from the log I use as reference, is the second value after the email, which is 240, the skin.
I hope someone sees a mistake somewhere, because I am out of ideas.
Thanks in advance
I've been struggling with this problem for a few months now, and I just can't solve it.
I use BlueG's MYSQL plugin, R6, because the others don't work very well for me.
Everything worked fine until I added date saving, but even if I remove it, it won't work.
Here's my loadstats code:
pawn Code:
stock LoadStats(playerid)
{
new pName[24],Query[800];
GetPlayerName(playerid,pName,24);
format(Query, sizeof(Query), "SELECT * FROM `Users` WHERE `Username` = '%s' ", pName);
mysql_query(Query);
mysql_store_result();
mysql_fetch_row_format(Query, "|");
sscanf(Query, "e<p<|>s[32]s[32]dddddfffddds[128]dddddddddddddddddddddddddddddddddddddddddddds[10]s[20]ddd>", PInfo[playerid]);
mysql_free_result();
return 1;
}
When I print the values, for example PInfo[playerid][Skin], it returns 0, while the debug log says it loaded id 240.
Code:
[11:37:39] CMySQLHandler::FetchRow() - Return: Jari_Johnson|password|5000|6|1|0|0|0|0|0|0|1|0|email@example.com|21|240|0|0|0|0|100|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0||127.0.0.1|3|2|2013 [11:37:39] >> mysql_free_result( Connection handle: 1 )
I hope someone sees a mistake somewhere, because I am out of ideas.
Thanks in advance