Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Error guardar accesorios en mysql

$
0
0
Buenas... otra vez yo xd, estoy editando y probando la GM de Optimus V3 y probé de mil maneras para guardar los accesorios y no me deja, me tirar error.

Aquí el log.

Code:

[03/09/2017 20:15:37] [CMD] Steven_Dominguez: /accesorios
[03/09/2017 20:15:55]
MYSQL -        ERRORID: 1064
Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Nombre` = 'Steven_Dominguez'' at line 1
Query: WHERE `Nombre` = 'Steven_Dominguez'
Callback: OnQueryFinish

[03/09/2017 20:15:57] - Cuentas actualizadas: [1 CUENTAS | TIEMPO: 2 MS | 1 JUGADORES]
[03/09/2017 20:16:00] [CMD] Steven_Dominguez: /actualizar archivos
[03/09/2017 20:16:05]  - Todos los archivos de configuración actualizados. [Steven_Dominguez | TIEMPO: 1792 MS]
[03/09/2017 20:16:05] [CMD] Steven_Dominguez: /actualizararchivos
[03/09/2017 20:16:05]
MYSQL -        ERRORID: 1064
Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Nombre` = 'Steven_Dominguez'' at line 1
Query: WHERE `Nombre` = 'Steven_Dominguez'
Callback: OnQueryFinish

[03/09/2017 20:16:05]
MYSQL -        ERRORID: 1064
Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Nombre` = 'Steven_Dominguez'' at line 1
Query: WHERE `Nombre` = 'Steven_Dominguez'
Callback: OnQueryFinish

[03/09/2017 20:16:05]
MYSQL -        ERRORID: 1064
Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Nombre` = 'Steven_Dominguez'' at line 1
Query: WHERE `Nombre` = 'Steven_Dominguez'
Callback: OnQueryFinish

[03/09/2017 20:16:05]
MYSQL -        ERRORID: 1064
Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Nombre` = 'Steven_Dominguez'' at line 1
Query: WHERE `Nombre` = 'Steven_Dominguez'
Callback: OnQueryFinish

[03/09/2017 20:16:05]
MYSQL -        ERRORID: 1064
Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Nombre` = 'Steven_Dominguez'' at line 1
Query: WHERE `Nombre` = 'Steven_Dominguez'
Callback: OnQueryFinish

[03/09/2017 20:16:06] [chat] [Steven_Dominguez]: asd
[03/09/2017 20:17:59] [CMD] Steven_Dominguez: /actualizarcuentas
[03/09/2017 20:18:06] [chat] [Steven_Dominguez]: asd
[03/09/2017 20:18:09] [part] Steven_Dominguez has left the server (2:1)
[03/09/2017 20:18:35] [connection] incoming connection: 192.168.1.104:56157 id: 2
[03/09/2017 20:18:36] [join] Steven_Dominguez has joined the server (2:192.168.1.104)
[03/09/2017 20:18:49] - Cuenta cargada ('Steven_Dominguez' - 3 ms).
[03/09/2017 20:18:56] [CMD] Steven_Dominguez: /accesorios
[03/09/2017 20:19:00] [part] Steven_Dominguez has left the server (2:1)


y acá el script de guardar los accesorios.



Code:

stock ActualizarAccesorios(playerid, slot=-1)
{
        if(slot == -1)
        {
                Loop(i, MAX_ACCESORIOS, 0)
                {
                        ActualizarAccesorios(playerid, i);
                }
        }
       
       
        else if(slot > -1 && slot < MAX_ACCESORIOS)
        {
                new
                        querystr [200] = "UPDATE `usuarios` SET ",
                        str [50];

                A_Format (str, "`AttachModel_%d` = %d,", slot, InfoJugador[playerid][jAttachModel][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachBone_%d` = %d,", slot, InfoJugador[playerid][jAttachModel][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachPosx_%d` = %f,", slot, InfoJugador[playerid][jAttachPosx][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachPosy_%d` = %f,", slot, InfoJugador[playerid][jAttachPosy][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachPosz_%d` = %f,", slot, InfoJugador[playerid][jAttachPosz][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachAngx_%d` = %f,", slot, InfoJugador[playerid][jAttachAngx][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachAngy_%d` = %f,", slot, InfoJugador[playerid][jAttachAngy][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachAngz_%d` = %f,", slot, InfoJugador[playerid][jAttachAngz][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachEscx_%d` = %f,", slot, InfoJugador[playerid][jAttachEscx][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachEscy_%d` = %f,", slot, InfoJugador[playerid][jAttachEscy][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachEscz_%d` = %f,", slot, InfoJugador[playerid][jAttachEscz][slot]);
                strcat (querystr, str);

                A_Format (str, "`AttachOcultado_%d` = %d ", slot, InfoJugador[playerid][jAttachOcultado][slot]);
                strcat (querystr, str);

                A_Format (str, "WHERE `Nombre` = '%s'", pName (playerid));
                strcat (querystr, str);

                opmysql_tquery(str, "OnQueryFinish", "ii", playerid, query_type_unknown);
        }
        return 1;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>