06.08.2015, 11:44
Hi there, I have a problem with my login/register system. I can enter on the serve, register(if the account doesn't exists) and then If I exit I made a function to save everything for the player but in mysql_log I have an error..
This is the function
So.. what's wrong ? :-s I tried to repair it myself for some time..
Код:
[04:38:09] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `accounts` SET `Username` = %e, `Password` = %e, `posX` = %f, `posY` = %f, `posZ` = %f, `posA` = %f WHERE `ID` = %i" [04:38:09] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `accounts` SET `Username` = , `Password` = , `posX` = 50.", callback: "(null)", format: "(null)" [04:38:09] [DEBUG] CMySQLQuery::Execute[] - starting query execution [04:38:09] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `Password` = , `posX` = 50.0, `posY` = 50.0, `posZ` = 50.0, `posA` = 0.0 WHERE ' at line 1 [04:38:09] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
Код:
mysql_format(MySQL, query, sizeof(query), "UPDATE `accounts` SET `Username` = %e, `Password` = %e, `posX` = %f, `posY` = %f, `posZ` = %f, `posA` = %f WHERE `ID` = %d", playername, Player[playerid][Password], pos[0], pos[1], pos[2], pos[3], Player[playerid][ID]); mysql_tquery(MySQL, query, "", "");