20.04.2012, 11:10
You should know that db_get_field_assoc() returns a string, the code you have here:
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.
This might not solve your problem - but it should make things a little more clear for you.
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);
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);