Hallo, ich habe mir heute vorgenommen mein Script von Textdateien zur Datenspeicherung per Datenbank umzuschreiben.
Ausgewählt habe ich dafür SQlite.
Nur habe ich jetzt das Problem, dass mein Server abstürzt, sobald ein Spieler spawnt.
Laut Crashdetect bei folgender Zeile:
public Float:sql_float (TABLE[],FELD[],where_is[]){
new query[128];
format(query,128,"SELECT `%s` FROM `%s` WHERE `Name` = '%s'",FELD,TABLE,where_is);
new DBResult:result = db_query(Spielerdata,query);
db_get_field(result,0,query,200);
new Float:ID = floatstr(query);
db_free_result(result); <--- hier
return ID;
}
Falls einer was mit den Fehlercodes anfangen kann, hier die Ausgabe von Crashdetect.
[21:29:33] [debug] Server crashed while executing script.amx
[21:29:33] [debug] AMX backtrace:
[21:29:33] [debug] #0 native db_get_field () [0044dd80] from samp-server.exe
[21:29:33] [debug] #1 0010a934 in public Float:sql_float (TABLE[]=@0x00791ea4 "Accounts", FELD[]=@0x00791ec8 "weste", where_is[]=@0x00810178 "mbcool") at C:\Users\Max\Desktop\samp\gamemodes\script.pwn:17258
[21:29:33] [debug] #2 000179f0 in public OnPlayerSpawn (playerid=0) at C:\Users\Max\Desktop\samp\gamemodes\script.pwn:1743
[21:29:33] [debug] System backtrace:
[21:29:33] [debug] #0 6e281c02 in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #1 6e284056 in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #2 6e27afcf in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #3 6e281c2e in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #4 0046c680 in ?? () from C:\Users\Max\Desktop\samp\samp-server.exe
[21:29:33] [debug] #5 6e281c2e in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #6 0046d530 in ?? () from C:\Users\Max\Desktop\samp\samp-server.exe
[21:29:33] [debug] AMX backtrace:
[21:29:33] [debug] #0 native db_get_field () [0044dd80] from samp-server.exe
[21:29:33] [debug] #1 0010a934 in public Float:sql_float (TABLE[]=@0x00791ea4 "Accounts", FELD[]=@0x00791ec8 "weste", where_is[]=@0x00810178 "mbcool") at C:\Users\Max\Desktop\samp\gamemodes\script.pwn:17258
[21:29:33] [debug] #2 000179f0 in public OnPlayerSpawn (playerid=0) at C:\Users\Max\Desktop\samp\gamemodes\script.pwn:1743
[21:29:33] [debug] System backtrace:
[21:29:33] [debug] #0 6e281c02 in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #1 6e284056 in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #2 6e27afcf in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #3 6e281c2e in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #4 0046c680 in ?? () from C:\Users\Max\Desktop\samp\samp-server.exe
[21:29:33] [debug] #5 6e281c2e in ?? () from C:\Users\Max\Desktop\samp\plugins\crashdetect.DLL
[21:29:33] [debug] #6 0046d530 in ?? () from C:\Users\Max\Desktop\samp\samp-server.exe
Ich bedanke mich im Vorraus