2021-04-30, 04:16 PM
(2021-04-28, 05:47 PM)israel_Oliveira Wrote: I changed to R41-3
[04/28/21 14:36:15] [DEBUG] CConnection::CConnection(this=0xec67c008, host='IP', user='USER', passw='PASS', db='logs_servidor', options=0x97ede98)
[04/28/21 14:36:15] [DEBUG] CConnection::CConnection - new connection = 0x9888af8
[04/28/21 14:36:15] [DEBUG] CThreadedConnection::CThreadedConnection(this=0xec67c008, connection=0xec67c008)
[04/28/21 14:36:15] [DEBUG] CThreadedConnection::WorkerFunc(this=0xec67c008, connection=0xec67c008)
[04/28/21 14:36:15] [INFO] Connection handle with id '1' successfully created.
[04/28/21 14:36:15] [DEBUG] CHandleManager::Create - new handle = 0x97a2758
[04/28/21 14:36:15] [DEBUG] mysql_connect: return value: '1'
[04/28/21 14:42:26] [ERROR] mysql_format: invalid connection handle '0'
[04/28/21 14:42:26] [ERROR] error #1065 while executing query "": Query was empty
[04/28/21 14:42:26] [ERROR] mysql_format: invalid connection handle '0'
[04/28/21 14:42:26] [ERROR] error #1065 while executing query "": Query was empty
[04/28/21 14:42:29] [ERROR] error #1064 while executing query "er Logs:{ffffff} ComandoLog
": 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 'er Logs:{ffffff} ComandoLog' at line 1
I am not able to find the error, only that the version of mysql server is different
[04/28/21 14:42:26] [ERROR] mysql_format: invalid connection handle '0'
It says that you are using a wrong connection handle in your MySQL Format.
You are using something like mysql_format(0, query, sizeof(query), "INSERT INTO..." instead of mysql_format(Dtabase, query, sizeof(query), "INSERT INTO..."
And how you define Database?
Well, using it in the mysql_connect at the OnGamemodeInit.
new MySQL: Database; // This is going at the start of the gamemode.
new MySQLOpt: option_id = mysql_init_options(); // This, in GamemodeInit as the two below this one.
mysql_set_option(option_id, AUTO_RECONNECT, true); // We will set that option to automatically reconnect on timeouts.
Database = mysql_connect(IP_SQL, USER_SQL, PASSWORD_SQL, DATABASE_SQL, option_id);
Argentinian SA-MP Programmer. Playing since 2013.