MySQL problem
#1

pawn Код:
new Query[256];
format(Query, sizeof(Query), "SELECT `username` FROM `players` WHERE username = '%s' AND FMember = %d LIMIT %d", inputtext, PlayerInfo[playerid][pFMember], MAX_FAMILIES);
mysql_function_query(g_Handle, Query, true, "OnFamilyFire", "s[100]i", inputtext, playerid);
Hello again.. I'm using the code above in OnDialogResponse, but OnFamilyFire(the callback below) doesn't work. (mysql_log doesn't give any information from the queries from the OnFamilyFire callback)

pawn Код:
forward OnFamilyFire(name[], playerid);
public OnFamilyFire(name[], playerid)
{
    new Query[200];
    new rows, fields;
    cache_get_data(rows, fields);
    if(!rows)
    {
        ShowPlayerDialog(playerid, 999, DIALOG_STYLE_MSGBOX, "{00BC00}Meniul {F6F6F6}Familiei", "{00BC00}EROARE! {F6F6F6}Acel jucator nu este in familia ta sau nici nu exista!", "OK", "");
    }
    else
    {
        format(Query, sizeof(Query), "UPDATE `players` SET `FMember` = 255 WHERE username = '%s'", name);
        mysql_function_query(g_Handle, Query, false, "SendQuery", "");
        ShowPlayerDialog(playerid, 999, DIALOG_STYLE_MSGBOX, "{00BC00}Meniul {F6F6F6}Familiei", "{00BC00}Succes! {F6F6F6}Acel jucator a fost dat afara!", "OK", "");
    }
    return 1;
}
I believe the problem is from this line:
pawn Код:
mysql_function_query(g_Handle, Query, true, "OnFamilyFire", "s[100]i", inputtext, playerid);
Please, please help me!
Reply


Messages In This Thread
MySQL problem - by CONTROLA - 01.12.2012, 11:17
Re: MySQL problem - by Ballu Miaa - 01.12.2012, 11:21
Re: MySQL problem - by CONTROLA - 01.12.2012, 11:22
Re: MySQL problem - by InfiniTy. - 01.12.2012, 12:09
Re: MySQL problem - by CONTROLA - 01.12.2012, 12:44
Re: MySQL problem - by Ballu Miaa - 02.12.2012, 06:19
Re: MySQL problem - by ReneG - 02.12.2012, 07:22

Forum Jump:


Users browsing this thread: 2 Guest(s)