SA-MP Forums Archive
[MySQL]Closing the connection - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [MySQL]Closing the connection (/showthread.php?tid=501465)



[MySQL]Closing the connection - Mauricee - 18.03.2014

Код:
public OnGameModeExit()
{
	mysql_close(SQL,true); // Closing the MySQL connection
	return 1;
}
Quote:

[14:23:35] [debug] AMX backtrace:
[14:23:35] [debug] #0 native mysql_close () [65a1d920] from mysql.DLL
[14:23:35] [debug] #1 00046a1c in ?? () from cms.amx
[14:23:35] [debug] #2 0000719c in public ScriptInit_OnGameModeExit () from cms.amx
[14:23:35] [debug] #3 0000302c in public OnGameModeExit () from cms.amx
[14:23:35] [debug] Native backtrace:
[14:23:35] [debug] #0 100379cc in ?? () from LIBMYSQL.dll
[14:23:35] [debug] #1 10037a7a in ?? () from LIBMYSQL.dll




Re: [MySQL]Closing the connection - Sascha - 18.03.2014

show the OnGameModeInit and the definition of the "SQL" varaiable... (it needs to be global and won't work at all if you defined it under "OnGameModeInit").. and which plugin are you using anyway?


Re: [MySQL]Closing the connection - maddinat0r - 18.03.2014

If you are using BlueG's MySQL plugin (you probably do), update your MySQL plugin to R38, there are a ton of bug fixes between the version you currently use and R38. Your script won't compile directly though due to syntax changes. Just ask here if you have any problems regarding updating the plugin.