SQL lite loading number 48 from nowhere
#2

You should know that db_get_field_assoc() returns a string, the code you have here:

pawn Код:
db_get_field_assoc(Result, "ADMIN", pInfo[playerid][pAdmin], 30);
                    db_get_field_assoc(Result, "VIP", pInfo[playerid][pVip], 30);
                    db_get_field_assoc(Result, "CASH", pInfo[playerid][pCash], 30);
                    db_get_field_assoc(Result, "SCORE", pInfo[playerid][pScore], 30);
most likely consists of integers, the best thing to do is to create a temporary string that you can use to unload your data, then use strval to convert it back in to an integer.

pawn Код:
new szUnload[30];

db_get_field_assoc(Result, "ADMIN", szUnload, sizeof(szUnload));
pInfo[playerid][pAdmin] = strval(szUnload);

db_get_field_assoc(Result, "VIP", szUnload, sizeof(szUnload));
pInfo[playerid][pVip] = strval(szUnload);

db_get_field_assoc(Result, "CASH", szUnload, sizeof(szUnload));
pInfo[playerid][pCash] = strval(szUnload);

db_get_field_assoc(Result, "SCORE", szUnload, sizeof(szUnload));
pInfo[playerid][pScore] = strval(szUnload);
This might not solve your problem - but it should make things a little more clear for you.
Reply


Messages In This Thread
SQL lite loading number 48 from nowhere - by [WSF]ThA_Devil - 20.04.2012, 11:03
Re: SQL lite loading number 48 from nowhere - by Calgon - 20.04.2012, 11:10
Re: SQL lite loading number 48 from nowhere - by [WSF]ThA_Devil - 20.04.2012, 11:12

Forum Jump:


Users browsing this thread: 1 Guest(s)