mysql_function_query Problem
#1

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:
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;
}
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
Reply


Messages In This Thread
mysql_function_query Problem - by oKzrh - 30.07.2012, 09:37
Re: mysql_function_query Problem - by SomebodyAndMe - 30.07.2012, 09:55
Re: mysql_function_query Problem - by oKzrh - 30.07.2012, 09:57
Re: mysql_function_query Problem - by SomebodyAndMe - 30.07.2012, 10:10
Re: mysql_function_query Problem - by oKzrh - 30.07.2012, 10:16
Re: mysql_function_query Problem - by SomebodyAndMe - 30.07.2012, 10:37
Re: mysql_function_query Problem - by oKzrh - 30.07.2012, 11:02
Re: mysql_function_query Problem - by SomebodyAndMe - 30.07.2012, 11:06
Re: mysql_function_query Problem - by oKzrh - 30.07.2012, 11:09
Re: mysql_function_query Problem - by ReneG - 30.07.2012, 12:07

Forum Jump:


Users browsing this thread: 1 Guest(s)