Function: mysql_fetch_field called when no result stored. Commands out of sync; you can't run this command now.
#1

bueno primero que nada buenas noches/tardes/dias
tengo otro problema mбs-...
si lo sй jaja, tengo tiempo sin entrar, y se han actualizado mucho las cosas al parecer

tengo un problema con mysql

cuando carga todo sale bien
no sale ningun error, asi que creo que es error del script y de algunas variables
pawn Код:
[18:56:13] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[18:56:13] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can'
t run this command now.
[18:56:13] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can't run this command now.
[18:56:13] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can'
t run this command now.
[18:56:13] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[18:56:13] [MySQL] Error (0): Function: mysql_num_rows called when no result stored. Commands out of sync; you can'
t run this command now.
[18:56:13] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
[18:56:15] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can'
t run this command now.
[18:56:15] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[18:56:15] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can'
t run this command now.
[18:56:15] [MySQL] Error (0): Function: mysql_store_result called when no prior successful query executed. Commands out of sync; you can't run this command now.
[18:56:15] [MySQL] Error (0): Function: mysql_fetch_field called when no result stored. Commands out of sync; you can'
t run this command now.
[18:56:15] [MySQL] Error (0): Failed to exeute query. Commands out of sync; you can't run this command now.
tengo esos errores
el primero me sale cuando se conecta el jugador
pawn Код:
public OnPlayerConnect(playerid)
{
    seconds[playerid] = 0;
    #if TEST == 0
    new query[500];
    format(query, sizeof(query), "SELECT `user` FROM `banned` WHERE `IP`='%s' OR `user`='%s' ORDER BY `id`", gPlayerInfo[playerid][pIp],gPlayerInfo[playerid][pName]);
    mysql_query(query);
    mysql_store_result();
    if( mysql_num_rows( ) > 0 )
    {
        Messagekick(playerid, "banned bitch go forums :V");
        Banned[playerid] = 1;
        mysql_free_result();
        return 1;
    }
    mysql_free_result( );
    format(query, sizeof(query),"SELECT `user` FROM `playerinfo` WHERE `user`='%s'",gPlayerInfo[playerid][pName]);
    mysql_query(query);
    mysql_store_result();
    if(mysql_num_rows() != 0)
    {
        SendClientMessage(playerid, YELLOW, "This account is registered, please login");
        ShowPlayerDialog(playerid, 40, DIALOG_STYLE_PASSWORD , "Login", "This account is registered, please login", "OK", "Cancel");
        gPlayerInfo[playerid][pReggedAcc]=1;
    }
    else {
        ShowPlayerDialog(playerid, 35, DIALOG_STYLE_PASSWORD , "Register", "This account is not registered, please register!", "OK", "Cancel");
        gPlayerInfo[playerid][pReggedAcc]=0;
        SendClientMessage( playerid, ORANGE, "register if you aren-t registred" );
    }
    mysql_query(query);
    mysql_free_result();
    #endif
    #if TEST == 1
    gPlayerInfo[playerid][pAlevel] = 5;
    gPlayerInfo[playerid][pLogged]=1;
    #endif
    return 1;
}
eso es lo que tengo en onplayerconnect,

luego cuando doy spawn sale el resto, creo que es problema de mi sistema de registro, si necesitan saber cual es el codigo, de los dialogos de registro para saber/determinar cual es el error me avisa, por favor ayuda con esto, necesito terminar esto asap X_x
Reply
#2

arreglado, soloe era de poner los store_result en los query tenia algunos de mбs solo era eso
Reply


Forum Jump:


Users browsing this thread: