15.07.2018, 16:37
Hello, I've got some MySQL issues regarding saving characters.
This is the errors for updating & saving characters
The game mode lines in question
( 9628 )
( 9458 ) (TerminateConnection Stock)
Line 9999 is the return 1;
Nex-AC error
This is the errors for updating & saving characters
Code:
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 '6446766', `Savings` = '0', `PlayingHours` = '0', `plaUpgrade` = '0', `DonateRank' at line 1 (cs.pwn:9628 -> cs.pwn:9456 -> cs.pwn:9999 -> C:\Users\AccountName\Desktop\Testing But again\pawno\include\YSI\y_iterate.inc:909 -> C:\Users\AccountName\Desktop\Testing But again\pawno\include\sscanf2.inc:260 -> C:\Users\AccountName\Desktop\Testing But again\pawno\include\nex-ac.inc:2945)
( 9628 )
Code:
There is more code before this but I dont find it relevant. format(query, sizeof(query), "%s, `Jailtime2` = %d, `ADPoint` = '%d', `WepLic` = '%d', `PrimaryLicense` = '%d', `SecondaryLicense` = '%d', `CCWLicense` = '%d', `playerSWAT` = '%d',`Tester` = '%d'", query, PlayerData[playerid][pJailTime2], PlayerData[playerid][pADPoint], PlayerData[playerid][pWepLic], PlayerData[playerid][pPLicense], PlayerData[playerid][pSLicense], PlayerData[playerid][pCCWLic], PlayerData[playerid][pSwat], PlayerData[playerid][pTester] ); format(query, sizeof(query), "%s WHERE `ID` = '%d'", query, PlayerData[playerid][pID] ); mysql_query(dbCon, query); printf("Save Player ID %d: %d", playerid, strlen(query));
Code:
if (SQL_IsLogged(playerid)) { SQL_SaveCharacter(playerid); RunDisconnect(playerid); } ResetStatistics(playerid); return 1;
Code:
stock RunDisconnect(playerid) { if(AccountData[playerid][aConnectionID]) { new query[128]; format(query,sizeof(query),"UPDATE logs_connection SET disconnected = NOW() WHERE id = '%d'",AccountData[playerid][aConnectionID]); mysql_query(dbCon, query); } }
Code:
public OnPlayerDisconnect(playerid, reason) { new str[128]; /*PlayerData[playerid][pLeaveTime] = GetTickCount(); format(PlayerData[playerid][pLeaveIP], 16, PlayerData[playerid][pIP]); */ new szDisconnectReason[3][] = {"Timeout","Leaving","Kicked"}; format(str, sizeof str, "*** %s Left the server (%s)", ReturnName(playerid), szDisconnectReason[reason]); ProxJoinServer(playerid, 20.0, str); if(reason == 0) PlayerData[playerid][pTimeout]= gettime(); TerminateConnection(playerid); return 1; }
Code:
&& defined ac_OnPlayerDisconnect return ac_OnPlayerDisconnect(playerid, reason);