SA-MP Forums Archive
їPor quй este error en la consola? MYSQL. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: їPor quй este error en la consola? MYSQL. (/showthread.php?tid=610113)



їPor quй este error en la consola? MYSQL. - Fagrinht - 19.06.2016

Код:
CALLBACK: SaveAccount(playerid)
{
	GetPlayerPos(playerid, PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ]);
	GetPlayerHealth(playerid, PlayerInfo[playerid][pVida]), GetPlayerArmour(playerid, PlayerInfo[playerid][pChaleco]);
    format(Query, 200, "UPDATE `ev_cuentas` SET `Vida`='%f', `Chaleco`='%f', `Administrador`='%d', `Nivel`='%d', `PosX`='%f', `PosY`='%f', `PosZ`='%f', `Edad`='%d' WHERE `Nombre`='%s'", PlayerInfo[playerid][pVida], PlayerInfo[playerid][pChaleco],
    PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pNivel], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pEdad], NombreJugador(playerid));
    mysql_function_query(TuberiaMYSQL, Query, true, "OnQueryFinish", "ii", 0, playerid);
    return 1;
}
Error: [14:26:25] [ERROR] ID: 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 '' at line 1 - Callback - OnQueryFinish - Query: UPDATE ev_cuentas SET Vida = 100.000000, Chaleco = 0.000000, Administrador = 0, Nivel = 1, `PosX = 1642.410034, PosY= -2329.688964, PosZ =14.036091, Edad = 20 WHERE Nombre = Gonzalo2


Respuesta: їPor quй este error en la consola? MYSQL. - wharlos - 20.06.2016

Creo que es por las pocas celdas


Respuesta: їPor quй este error en la consola? MYSQL. - Eloy - 20.06.2016

Aumenta el buffer del query

Quote:

format(Query, 512, "UPDATE `ev_cuentas` SET `Vida`='%f', `Chaleco`='%f', `Administrador`='%d', `Nivel`='%d', `PosX`='%f', `PosY`='%f', `PosZ`='%f', `Edad`='%d' WHERE `Nombre`='%s'", PlayerInfo[playerid][pVida], PlayerInfo[playerid][pChaleco],
PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pNivel], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], PlayerInfo[playerid][pEdad], NombreJugador(playerid));




Respuesta: їPor quй este error en la consola? MYSQL. - Fagrinht - 20.06.2016

Quote:
Originally Posted by Eloy
Посмотреть сообщение
Aumenta el buffer del query
Gracias.