06.08.2015, 12:14
Hi there, I made a login/register system, It works with the part on the register and then.. when I enter back on the server it tells me to put the password if the account exists, after I put the correct password I'm not being spawned -.-
This is what it says in mysql_log
And then..this is the accountload public.
and the login part with the SELECT * FROM `accounts` .. etc
Anybody has any idea why the hell it's not F'n working ? -.- I tried for hours to F'n repair that F'n system and still not F'n working
This is what it says in mysql_log
Код:
[05:10:30] [DEBUG] mysql_format - connection: 1, len: 512, format: "SELECT FROM `accounts` WHERE `ID` = %d, `Username` = %e, `Password` = %e" [05:10:30] [DEBUG] mysql_tquery - connection: 1, query: "SELECT FROM `accounts` WHERE `ID` = 3, `Username` = SpikeSpigel3", callback: "OnAccountLoad", format: "i" [05:10:30] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - starting query execution [05:10:30] [ERROR] CMySQLQuery::Execute[OnAccountLoad] - (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 'FROM `accounts` WHERE `ID` = 3, `Username` = SpikeSpigel32, `Password` = E8040D9' at line 1 [05:10:30] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - error will be triggered in OnQueryError
Код:
forward OnAccountLoad(playerid); public OnAccountLoad(playerid) { TogglePlayerSpectating(playerid, false); SetSpawnInfo(playerid, 0, 23, SPAWN_X, SPAWN_Y, SPAWN_Z, SPAWN_A, 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); return 1; }
Код:
mysql_format(MySQL, query, sizeof(query), "SELECT FROM `accounts` WHERE `ID` = %d, `Username` = %e, `Password` = %e",Player[playerid][ID], playername, Player[playerid][Password]); mysql_tquery(MySQL, query, "OnAccountLoad", "i", playerid);