Player info loading ( sscanf )
#1

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.
Reply
#2

Fixed the problem by using old sscanf version
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)