30.07.2012, 09:37
Hi.
I have a problem.
I'm trying to load some info through "mysql_function_query", and it just doesn't work well.
This is the callback:
And it turns out to be wrong values.. For example "pInfo[playerid][pBank]" is 299 when is should be 5000...
I think I have some bugs in the code, could you guys help me?
Thanks
I have a problem.
I'm trying to load some info through "mysql_function_query", and it just doesn't work well.
This is the callback:
pawn Код:
public GetPlayerInfo(playerid) {
new rows, fields, temp[70];
cache_get_data(rows, fields);
if (rows) {
cache_get_row(0, 0, temp); // Password
pInfo[playerid][pPass] = strval(temp);
cache_get_row(0, 1, temp); // Male
pInfo[playerid][pMale] = strval(temp);
cache_get_row(0, 2, temp); // Origin
format(pInfo[playerid][pOrigin], 30, "%s", temp);
cache_get_row(0, 3, temp); // Skin
pInfo[playerid][pSkin] = strval(temp);
cache_get_row(0, 4, temp); // Money
pInfo[playerid][pMoney] = strval(temp);
cache_get_row(0, 5, temp); // Bank Money
pInfo[playerid][pBankMoney] = strval(temp);
cache_get_row(0, 6, temp); // Banned
pInfo[playerid][pBanned] = strval(temp);
if (pInfo[playerid][pBanned] == 1) {
SCM(playerid, COLOR_ORANGE, "You are banned from this server!");
Kick(playerid);
}
}
return 1;
}
I think I have some bugs in the code, could you guys help me?
Thanks