01.02.2012, 21:11
Alright as the title says, I'm having difficulties loading with SSCANF2 from MYSQL Database. Let's start off by showing you the issue:
The printfs from ingame:
Let me explain incase you don't understand, 0 = Playerid, the 0.0000 is the x,y,z, The second 0 on the second line is the skinid.
This is the account on the database information.
That's the actual information, so now you see the issue..here's the loading code using sscanf2:
Thanks in advance for anyone who helps fix the issue.
The printfs from ingame:
pawn Код:
[17:09:25] 0 position has been loaded to: 0.000000 , 0.000000, 0.000000
[17:09:25] 0 Skin has been set as 0
This is the account on the database information.
pawn Код:
Username Password Skin X Y Z
Tyrone_Williams censored 25 209.386 -64.907 1.57812
pawn Код:
if(mysql_num_rows() != 0)
{
mysql_fetch_row_format(query, "|");
sscanf(query, "e<p<|>ifff>", PlayerInfo[playerid]);
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][Skin], PlayerInfo[playerid][Posx], PlayerInfo[playerid][Posy], PlayerInfo[playerid][Posz], 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
printf("%i position has been loaded to: %f , %f, %f", playerid, PlayerInfo[playerid][Posx],PlayerInfo[playerid][Posy],PlayerInfo[playerid][Posz]);
SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]);
printf("%i Skin has been set as %d", playerid, playerskin);
mysql_free_result();
SendClientMessage(playerid, -1, "Loaded using sscanf - Debug testing.");
}