SA-MP Forums Archive
Player info loading ( sscanf ) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Player info loading ( sscanf ) (/showthread.php?tid=456985)



Player info loading ( sscanf ) - ajwar - 08.08.2013

After changing host some problems came up. Something is wrong with player info loading. For example player hp, armour, position loads not corectly. Variables just get some "random" values.

pawn Код:
new Query[1150];
    if(mysql_fetch_row(Query))
    {
       
        sscanf(Query, "e<p<|>ds[24]s[35]ddddfffdddddddddddddddddddddddddddddds[20]s[20]s[50]s[16]s[20]dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddffddddddddddddddddddddddddddddd>", PVar[iPlayer]);
        mysql_free_result();
    }
    return 1;
The problem is only with floats. It shows correct values from mysql debug file, but when i try to use them for example SetPlayerHealth(playerid, pvar[playerid][hp]) it's not working and instead the variables gets some random values.

I have downloaded latest sscanf plugin and library.


Re: Player info loading ( sscanf ) - ajwar - 08.08.2013

Fixed the problem by using old sscanf version