Hey liebes Forum,
Ich habe ein kleines Problem mit meinem Script bezüglich MySQL.
Bei OnGameModeExit() gebe ich an das die MySQL verbindung geschlossen werden soll mit:
mysql_close(0);
Mein Problem wenn ich die 0 eingebe ist das eine mysql_error.log erstellt wird wo folgendes drinne steht:
Die verbindung erstelle ich mit:
dbhandle = mysql_connect(db_host,db_user,db_db,db_pass);
also sollte dbhandle die lösung sein. FALSCH
Wenn ich also das ingebe:
mysql_close(dbhandle);
Und den Server dann Neustarte crasht der Server server_log.txt
Code
[00:00:14] [debug] Server crashed while executing script.amx[00:00:14] [debug] AMX backtrace:[00:00:14] [debug] #0 native mysql_close () [f722c490] from mysql_static.so[00:00:14] [debug] #1 00020de8 in public ScriptInit_OnGameModeExit () from script.amx[00:00:14] [debug] #2 000072a8 in public OnGameModeExit () from script.amx[00:00:14] [debug] Native backtrace:[00:00:14] [debug] #0 f677f936 in _ZN10StackTraceC2EPv () from plugins/crashdetect.so[00:00:14] [debug] #1 f677af33 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so[00:00:14] [debug] #2 f677ba62 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so[00:00:14] [debug] #3 f677bf63 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so[00:00:14] [debug] #4 f677f63d in ?? () from plugins/crashdetect.so[00:00:14] [debug] #5 f77af410 in ?? ()[00:00:14] [debug] #6 f7269b01 in ?? () from plugins/mysql_static.so[00:00:14] [debug] #7 f7269eb3 in my_net_read () from plugins/mysql_static.so[00:00:14] [debug] #8 f7263a8f in cli_safe_read () from plugins/mysql_static.so[00:00:14] [debug] #9 f72641c5 in ?? () from plugins/mysql_static.so[00:00:14] [debug] #10 f72623f4 in mysql_real_query () from plugins/mysql_static.so[00:00:14] [debug] #11 f7218036 in _ZN11CMySQLQuery7ExecuteEv () from plugins/mysql_static.so[00:00:14] [debug] #12 f72127ec in _ZN12CMySQLHandle14ProcessQueriesEv () from plugins/mysql_static.so[00:00:14] [debug] #13 f72141c7 in _ZN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0Iv12CMySQLHandleEENS2_5list1INS2_5valueIPS6_EEEEEEE3runEv () from plugins/mysql_static.so[00:00:14] [debug] #14 f72385c1 in ?? () from plugins/mysql_static.so[00:00:14] [debug] #15 f775dc39 in ?? () from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0[00:00:00] [debug] #16 f758ee1e in clone () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
Nur wieso ich beine dbhandle muss ja eigentlich das richtige sein oder nicht?
Vielen Dank schonmal im vorraus
MfG. Chris