SSCANF2 Loading Issue with MYSQL
#1

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:

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
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.

pawn Код:
Username    Password    Skin    X   Y   Z
     Tyrone_Williams    censored    25  209.386 -64.907 1.57812
That's the actual information, so now you see the issue..here's the loading code using sscanf2:

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.");
                }
Thanks in advance for anyone who helps fix the issue.
Reply


Messages In This Thread
SSCANF2 Loading Issue with MYSQL - by Abreezy - 01.02.2012, 21:11
Re: SSCANF2 Loading Issue with MYSQL - by Abreezy - 01.02.2012, 21:27
Re: SSCANF2 Loading Issue with MYSQL - by DRIFT_HUNTER - 01.02.2012, 21:59
Re: SSCANF2 Loading Issue with MYSQL - by Abreezy - 01.02.2012, 22:24
Re: SSCANF2 Loading Issue with MYSQL - by Abreezy - 02.02.2012, 03:36

Forum Jump:


Users browsing this thread: 1 Guest(s)