SA-MP Forums Archive
SQLite - 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: SQLite (/showthread.php?tid=543023)



SQLite - Ph0eniX - 23.10.2014

Hi all , i tryed to make in script multiple get_field.... and when i start the server i get debug :

db_get_field_assoc(Result, "gangname", GangInfo[gangid][GName], MAX_STRING_SIZE);
db_free_result(Result);

db_get_field_assoc(Result, "gangpoints", GangInfo[gangid][GPoints], MAX_STRING_SIZE);
db_free_result(Result); <<--- That is the line with debug , if i delete it i get at next

db_get_field_assoc(Result, "tankgpoints", GangInfo[gangid][GTankPoints], MAX_STRING_SIZE);
db_free_result(Result);

db_get_field_assoc(Result, "gangcolor", GangInfo[gangid][GangColor], MAX_STRING_SIZE);
db_free_result(Result);

So , what can i do?

Код:
[23:45:50] [debug] Native backtrace:
[23:45:50] [debug] #0 77dc434c in ?? () from C:\Windows\SysWOW64\ntdll.dll
[23:45:50] [debug] #1 77dc3407 in ?? () from C:\Windows\SysWOW64\ntdll.dll
[23:45:50] [debug] #2 77dc32f2 in ?? () from C:\Windows\SysWOW64\ntdll.dll
[23:45:50] [debug] #3 75cd14d1 in ?? () from C:\Windows\syswow64\kernel32.dll
[23:45:50] [debug] #4 00493bf1 in ?? () from samp-server.exe
[23:45:50] [debug] #5 00408124 in ?? () from samp-server.exe
[23:45:50] [debug] #6 750258ca in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #7 7502774f in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #8 75020834 in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #9 7502591a in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #10 00472dde in ?? () from samp-server.exe
[23:45:50] [debug] #11 004010b6 in ?? () from samp-server.exe
[23:45:50] [debug] #12 750258ca in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #13 7502774f in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #14 75020834 in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #15 7502591a in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #16 00472dde in ?? () from samp-server.exe
[23:45:50] [debug] #17 004010b6 in ?? () from samp-server.exe
[23:45:50] [debug] #18 750258ca in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #19 7502774f in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #20 75020834 in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #21 7502591a in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #22 00472dde in ?? () from samp-server.exe
[23:45:50] [debug] #23 004010b6 in ?? () from samp-server.exe
[23:45:50] [debug] #24 750258ca in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #25 7502774f in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #26 75020834 in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #27 7502591a in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #28 00472dde in ?? () from samp-server.exe
[23:45:50] [debug] #29 004010b6 in ?? () from samp-server.exe
[23:45:50] [debug] #30 750258ca in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #31 7502774f in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #32 75020834 in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #33 7502591a in ?? () from plugins\crashdetect.DLL
[23:45:50] [debug] #34 0046e624 in ?? () from samp-server.exe
[23:45:50] [debug] #35 65646f6d in ?? () from samp-server.exe
[23:45:50] [debug] #36 7a682f73 in ?? () from samp-server.exe
[23:45:50] [debug] #37 6d612e73 in ?? () from samp-server.exe



Re: SQLite - Jefff - 23.10.2014

free result must be always at the end

pawn Код:
db_get_field_assoc(Result, "gangname", GangInfo[gangid][GName], MAX_STRING_SIZE);
db_get_field_assoc(Result, "gangpoints", GangInfo[gangid][GPoints], MAX_STRING_SIZE);
db_get_field_assoc(Result, "tankgpoints", GangInfo[gangid][GTankPoints], MAX_STRING_SIZE);
db_get_field_assoc(Result, "gangcolor", GangInfo[gangid][GangColor], MAX_STRING_SIZE);
db_free_result(Result);



Re: SQLite - Ph0eniX - 24.10.2014

Quote:
Originally Posted by Jefff
Посмотреть сообщение
free result must be always at the end

pawn Код:
db_get_field_assoc(Result, "gangname", GangInfo[gangid][GName], MAX_STRING_SIZE);
db_get_field_assoc(Result, "gangpoints", GangInfo[gangid][GPoints], MAX_STRING_SIZE);
db_get_field_assoc(Result, "tankgpoints", GangInfo[gangid][GTankPoints], MAX_STRING_SIZE);
db_get_field_assoc(Result, "gangcolor", GangInfo[gangid][GangColor], MAX_STRING_SIZE);
db_free_result(Result);
Ty ,i never tryed to get multiple fields for that i don't saw this. +1 rep.