04.09.2010, 14:44
Hello , i have a problem with MySQL. The accounts are registering OK in MySQL database , but , when i'm reconnecting to the server , it doesn't load my account "infos".
I'm using mtrp-final mysql system.
OnPlayerConnect
My /login command :
Here is my OnPlayerLogin
http://pastebin.com/AcqqBT9U
And , in console , after i log in ; i have this error
And here is my : 'database.sql'
http://pastebin.com/tLj7XbTv
I'm using mtrp-final mysql system.
OnPlayerConnect
Код:
MySQLCheckConnection(); // Check if the account exists new sqlaccountstatus = MySQLCheckAccount(plname); if(sqlaccountstatus != 0) { // Check if the account is locked if (MySQLCheckAccountLocked(sqlaccountstatus) != 0) { SendClientMessage(playerid, COLOR_LIGHTRED, "This account has been locked and cannot be accessed. Please contact an admin."); Kick(playerid); return 0; } gPlayerAccount[playerid] = 1; PlayerInfo[playerid][pSQLID] = sqlaccountstatus; } else { SendClientMessage(playerid, COLOR_WHITE, "SERVER: Please register your account"); gPlayerAccount[playerid] = 0; }
Код:
if (strcmp(cmd, "/login", true) ==0 ) { if(IsPlayerConnected(playerid)) { if(gPlayerAccount[playerid] == 1) { new tmppass[64]; if(gPlayerLogged[playerid] == 1) { SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "SERVER: You are already logged in."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "USAGE: /login [password]"); return 1; } strmid(tmppass, tmp, 0, strlen(cmdtext), 255); //Encrypt(tmppass); gPlayerLogged[playerid] = 1; OnPlayerLogin(playerid,tmppass); } else { SendClientMessage(playerid, COLOR_WHITE, "SERVER: First use register command !"); } } return 1; }
http://pastebin.com/AcqqBT9U
And , in console , after i log in ; i have this error
Код:
[02:25:27] [death] Gabb died 255 [02:25:27] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:27] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:27] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:28] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:28] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:29] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:29] [chat] [Gabb]: masculin [02:25:29] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:30] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1 [02:25:30] Error in mysql_query: 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 'Ticket=0,Fuel=0,Married=0 WHERE id=1' at line 1
http://pastebin.com/tLj7XbTv