Error: Unknown column
#1

Nose porque pasa que al guardar los datos en la bd mysql, aparecen los sigientes errores en la consola.

Код:
 [ERROR] ID: 1054 - Error: Unknown column 'Posx' in 'field list' - Callback - OnQueryFinish - Query: UPDATE `accounts` SET `Vida`='100.000000', `Chaleco`='100.000000', `Admin`='7', `Score`='8', `Posx`='2425.940429', `Posy`='-1224.472045', `Posz`='25.262451' WHERE `Nombre`='Jejox'
Porque es?

Asi lo tengo en la callback onqueryfinish

pawn Код:
forward OnQueryFinish(resultid, extraid, ConnectionHandle);
public OnQueryFinish(resultid, extraid, ConnectionHandle)
{
    new Rows, Field, string[256];
    if(resultid != 0)
    {
        cache_get_data(Rows, Field);
    }
    InsideMainMenu[extraid] = true;
    switch(resultid)
    {
        case 1:
        {
            if(Rows == 1)
            {
                new content[8];
                cache_get_field_content(0, "Contraseсa", content); Info[extraid][pKey] = strval(content);
                cache_get_field_content(0, "Admin", content); Info[extraid][pAdminZC] = strval(content);
                cache_get_field_content(0, "Score", content); Info[extraid][pLevel] = strval(content);
                cache_get_field_content(0, "Vida", content); Info[extraid][pHealth] = floatstr(content);
                cache_get_field_content(0, "Chaleco", content); Info[extraid][pArmour] = floatstr(content);
                cache_get_field_content(0, "Posx", content); Info[extraid][pPos_x] = floatstr(content);
                cache_get_field_content(0, "Posy", content); Info[extraid][pPos_y] = floatstr(content);
                cache_get_field_content(0, "Posz", content); Info[extraid][pPos_z] = floatstr(content);
            }
            else if(!Rows)
            {
               //
            }
        }
        case 2:
        {
            if(Rows == 1)
            {
                INI_ParseFile(UserPath(extraid), "LoadUser_pass", .bExtra = true, .extra = extraid);
                new pName[24]; GetPlayerName(extraid, pName, 24);
                cache_get_field_content(0, "Contraseсa", Info[extraid][pKey]);
                format(string, sizeof(string), "El personaje %s estб registrado en la base de datos. Pon los datos para iniciar sesiуn:", pName);
                ShowPlayerDialog(extraid, DLOGIN, DIALOG_STYLE_PASSWORD,"Login",string,"Enviar","Salir");
                SetPlayerVirtualWorld(extraid, 20);
            }
            else if(!Rows)
            {
                new pName[24]; GetPlayerName(extraid, pName, 24);
                format(string, sizeof(string), "El jugador %s no estб registrado en el servidor, pon aquн la contraseсa para registrarlo:", pName);
                ShowPlayerDialog(extraid, MYSQLREGISTRO, DIALOG_STYLE_PASSWORD,"Registro:",string,"Enviar","Salir");
                SetPlayerVirtualWorld(extraid, 20);
            }
        }
    }
    return 1;
}
Una foto de las columnas que tengo

Reply
#2

Ves que defines en tu Pawn Script como "Posx" y en la db como "Posicion-x" de paso con signos, si usted no sabe definir valores le sugiero leer un poco, claramente se ve el error.
Reply
#3

Quote:
Originally Posted by Parka
Посмотреть сообщение
Ves que defines en tu Pawn Script como "Posx" y en la db como "Posicion-x" de paso con signos, si usted no sabe definir valores le sugiero leer un poco, claramente se ve el error.
Hay esta ahora no salta ningъn error, gracias, yo creнa que el nombre era algo para distinguirlo no sabia que era tan importante xD

+REP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)