[Include] SQLite Improved
#42

having a similar problem to ReVo I think:

Код:
[10:25:27] [debug] Server crashed while executing attdef.amx
[10:25:27] [debug] AMX backtrace:
[10:25:27] [debug] #0 00005554 in bool:stmt_fetch_row (&DBStatement:stStatement=@0x001f1170) at C:\Users\Dracule\Dropbox\AADeathZone\pawno\include\sqlitei.inc:1724
[10:25:27] [debug] #1 0004a9e4 in public S@@_OnDialogResponse (playerid=0, dialogid=21, response=1, listitem=-1, inputtext[]=@0x001eddf8 "REMOVED PASSWORD") at C:\Users\Dracule\Dropbox\AADeathZone\gamemodes\attdef.pwn:2420
[10:25:27] [debug] Native backtrace:
[10:25:27] [debug] #0 f7dbf60b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[10:25:27] [debug] #1 f7db6e92 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[10:25:27] [debug] #2 f7db88d9 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[10:25:27] [debug] #3 f7dbf2a0 in ?? () from plugins/crashdetect.so
[10:25:27] [debug] #4 ffffe600 in ?? ()
[10:25:27] [debug] #5 f7dc1a27 in amx_Exec () from plugins/crashdetect.so
[10:25:27] [debug] #6 f7db8abb in _ZN11CrashDetect9DoAmxExecEPii () from plugins/crashdetect.so
[10:25:27] [debug] #7 f7dbb100 in ?? () from plugins/crashdetect.so
[10:25:27] [debug] #8 080ae33f in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #9 080b97da in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #10 08071ae8 in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #11 08071be2 in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #12 0807ba00 in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #13 080b59ad in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #14 080b5b42 in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #15 080b1453 in ?? () from /home/tcagame/MaiwandM/148/samp03svr
[10:25:27] [debug] #16 00272ebc in __libc_start_main () from /lib/libc.so.6
[10:25:27] [debug] #17 0804b521 in ?? () from /home/tcagame/MaiwandM/148/samp03svr
after it restarted, it wouldn't even properly open the database:
Код:
[10:25:29] SQLitei Error: (db_query) Invalid persistent database given (F71EB748).
[10:25:29] SQLitei Notice: (db_free_result_hook) Invalid result given.
[10:25:29] Server Config Loaded.
[10:25:29] SQLitei Error: (db_query) Invalid persistent database given (F71EB748).
[10:25:29] SQLitei Notice: (db_free_result_hook) Invalid result given.
[10:25:29] Bases Loaded: 0
[10:25:29] SQLitei Error: (db_query) Invalid persistent database given (F71EB748).
[10:25:29] Arenas Loaded: 0
[10:25:29] SQLitei Error: (db_query) Invalid persistent database given (F71EB748).
[10:25:29] DMs Loaded: 0
[10:25:29] SQLitei Error: (db_query) Invalid persistent database given (F71EB748).
[10:25:29] Duels Loaded: 0
[10:25:29] SQLitei Error: (db_query) Invalid persistent database given (F71EB748).
[10:25:29] SQLitei Notice: (db_free_result_hook) Invalid result given.
[10:25:29] Bases Loaded: 0
the code:


pawn Код:
new Query[256];
            format(Query, sizeof(Query), "SELECT * FROM `Players` WHERE `Name` = '%s' AND `Password` = '%s'", Player[playerid][Name], HashPass);
            new DBStatement:stmt = db_prepare(sqliteconnection, Query);
            new level, weather, time, chatchannel, netcheck;
            stmt_bind_result_field(stmt, 1, DB::TYPE_STRING, CurrentPassword, sizeof(CurrentPassword));
            stmt_bind_result_field(stmt, 2, DB::TYPE_INT, level);
            stmt_bind_result_field(stmt, 3, DB::TYPE_INT, weather);
            stmt_bind_result_field(stmt, 4, DB::TYPE_INT, time);
            stmt_bind_result_field(stmt, 5, DB::TYPE_INT, chatchannel);
            stmt_bind_result_field(stmt, 6, DB::TYPE_INT, netcheck);
           
   
            if(stmt_execute(stmt)) {
                if(stmt_fetch_row(stmt)) {
                    Player[playerid][Level] = level;
                    Player[playerid][Weather] = weather;
                    Player[playerid][Time] = time;
                    Player[playerid][ChatChannel] = chatchannel;
                    Player[playerid][NetCheck] = netcheck;
                   
                    Player[playerid][Logged] = true;

                    SendClientMessage(playerid,-1, "You have successfully logged in.");
                    format(Query, sizeof(Query), "Level: %d | Weather: %d | Time: %d | Chat Channel: %d | Net Check: %d", level, weather, time, chatchannel, netcheck);
                    SendClientMessage(playerid, -1, Query);
                   
           
                } else {
                    SendClientMessage(playerid,-1,"{FFFFFF}Error: {0099FF}Wrong Password. Please try again.");
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{FFFFFF}Login Dialog","{FFFFFF}Type your password below to log in:","Login","Leave");
                }
            }
           
            stmt_close(stmt);
for now, I just won't use prepared statements.

Works on windows, doesn't work on Linux, www.hostspree.org
Reply


Messages In This Thread
SQLite Improved - by Slice - 14.12.2011, 20:28
Re: SQLite Improved - by Scenario - 14.12.2011, 20:32
Re: SQLite Improved - by TheArcher - 14.12.2011, 20:34
Re: SQLite Improved - by Gforcez - 14.12.2011, 20:35
Re: SQLite Improved - by Kar - 14.12.2011, 20:37
Re: SQLite Improved - by FireCat - 14.12.2011, 20:41
Re: SQLite Improved - by agent5 - 14.12.2011, 20:55
Re: SQLite Improved - by [HiC]TheKiller - 14.12.2011, 21:11
Re: SQLite Improved - by Lorenc_ - 15.12.2011, 04:32
Re: SQLite Improved - by System64 - 15.12.2011, 06:25
Re: SQLite Improved - by KoczkaHUN - 15.12.2011, 06:26
Re: SQLite Improved - by T0pAz - 15.12.2011, 06:34
Re: SQLite Improved - by Slice - 15.12.2011, 11:51
Re: SQLite Improved - by Finn - 15.12.2011, 13:03
Re: SQLite Improved - by TheArcher - 15.12.2011, 13:43
Re: SQLite Improved - by Scenario - 15.12.2011, 19:45
Re: SQLite Improved - by AustinJ - 16.12.2011, 05:18
Re: SQLite Improved - by Slice - 16.12.2011, 08:21
Re: SQLite Improved - by kizla - 22.12.2011, 11:45
Re: SQLite Improved - by Slice - 22.12.2011, 11:50
Re: SQLite Improved - by Slice - 07.02.2012, 08:27
Re: SQLite Improved - by antonio112 - 07.02.2012, 09:05
Re: SQLite Improved - by Niko_boy - 07.02.2012, 12:10
Re: SQLite Improved - by Luka P. - 07.02.2012, 13:06
Re: SQLite Improved - by Slice - 09.02.2012, 12:21
Re: SQLite Improved - by TheArcher - 09.02.2012, 14:08
Re: SQLite Improved - by Slice - 09.02.2012, 14:17
Re: SQLite Improved - by TheArcher - 09.02.2012, 14:29
Re: SQLite Improved - by Team_PRO - 29.08.2012, 10:20
Re: SQLite Improved - by Anonick - 29.08.2012, 12:07
Re: SQLite Improved - by Slice - 29.08.2012, 12:27
Re: SQLite Improved - by RedJohn - 08.09.2012, 08:57
Re: SQLite Improved - by Slice - 08.09.2012, 14:10
Re: SQLite Improved - by ViruZz - 10.09.2012, 17:55
Re: SQLite Improved - by Memoryz - 14.09.2012, 19:24
Re: SQLite Improved - by Slice - 14.09.2012, 19:33
Re: SQLite Improved - by Memoryz - 22.09.2012, 22:47
Re: SQLite Improved - by Slice - 23.09.2012, 02:53
Re: SQLite Improved - by ReVo_ - 20.04.2013, 19:03
Re: SQLite Improved - by Slice - 20.04.2013, 19:27
Re: SQLite Improved - by ReVo_ - 20.04.2013, 19:53
Re: SQLite Improved - by Whitetiger - 27.06.2013, 23:09
Re: SQLite Improved - by Slice - 28.06.2013, 07:00
Re: SQLite Improved - by K3 - 28.06.2013, 07:37
Re: SQLite Improved - by rhds - 12.07.2013, 16:25
Re: SQLite Improved - by Slice - 12.07.2013, 17:33
Re: SQLite Improved - by MSuperXX - 14.07.2013, 02:39
Re: SQLite Improved - by ReVo_ - 17.07.2013, 13:45
Re: SQLite Improved - by Slice - 17.07.2013, 13:53
Re: SQLite Improved - by ReVo_ - 17.07.2013, 13:58
Re: SQLite Improved - by Lorenc_ - 17.08.2013, 04:07
Re: SQLite Improved - by Slice - 07.10.2013, 08:09
Re: SQLite Improved - by Chenko - 18.12.2013, 00:40
Re: SQLite Improved - by PT - 18.12.2013, 13:54
Re: SQLite Improved - by Cypress - 22.12.2013, 09:09
Re: SQLite Improved - by xhunterx - 16.02.2014, 19:39
Re: SQLite Improved - by Misiur - 03.03.2014, 14:11
Re: SQLite Improved - by Slice - 04.03.2014, 04:27
Re: SQLite Improved - by Misiur - 04.03.2014, 10:09
Re: SQLite Improved - by Slice - 04.03.2014, 11:41
Re: SQLite Improved - by Whitetiger - 07.03.2014, 03:54
Re: SQLite Improved - by Slice - 07.03.2014, 08:18
Re: SQLite Improved - by Whitetiger - 07.03.2014, 09:06
Re: SQLite Improved - by Slice - 07.03.2014, 11:31
Re: SQLite Improved - by Whitetiger - 07.03.2014, 11:36
Re: SQLite Improved - by Slice - 07.03.2014, 12:03
Re: SQLite Improved - by Whitetiger - 07.03.2014, 12:16
Re: SQLite Improved - by Slice - 07.03.2014, 12:22
Re: SQLite Improved - by Arastair - 03.11.2014, 09:35
Re: SQLite Improved - by Slice - 13.07.2015, 21:17
Re: SQLite Improved - by Joey^ - 13.07.2015, 22:14
Re: SQLite Improved - by Crayder - 13.07.2015, 22:57
Re: SQLite Improved - by Joey^ - 13.07.2015, 23:06
Re: SQLite Improved - by vannesenn - 14.07.2015, 23:33
Re: SQLite Improved - by Joey^ - 15.07.2015, 00:07
Re: SQLite Improved - by PT - 17.07.2015, 17:14
Re: SQLite Improved - by Crayder - 17.07.2015, 20:28
Re: SQLite Improved - by PT - 17.07.2015, 20:55
Re: SQLite Improved - by Slice - 18.07.2015, 10:55
Re: SQLite Improved - by Sioux - 24.07.2015, 23:35
Re: SQLite Improved - by Crayder - 25.07.2015, 00:57
Re: SQLite Improved - by Crayder - 25.07.2015, 01:06
Re: SQLite Improved - by Sioux - 25.07.2015, 11:02
Re: SQLite Improved - by PT - 07.08.2015, 21:12
Re: SQLite Improved - by Slice - 08.08.2015, 11:10
Re: SQLite Improved - by PT - 08.08.2015, 12:04
Re: SQLite Improved - by Grimlock - 24.05.2016, 12:37
Re: SQLite Improved - by Amunra - 25.05.2016, 05:26
Re: SQLite Improved - by Amunra - 26.05.2016, 07:59
Re: SQLite Improved - by vannesenn - 26.05.2016, 09:07
Re: SQLite Improved - by Amunra - 26.05.2016, 11:06
Re: SQLite Improved - by justice96 - 26.05.2016, 11:13
Re: SQLite Improved - by KONTROWKEN - 07.06.2016, 19:22
Re: SQLite Improved - by PT - 20.10.2016, 15:16
Re: SQLite Improved - by vannesenn - 21.10.2016, 20:15
Re: SQLite Improved - by PT - 22.10.2016, 07:46
Re: SQLite Improved - by PT - 22.10.2016, 20:29
Re: SQLite Improved - by PT - 22.10.2016, 21:36
Re: SQLite Improved - by Vin Diesel - 28.01.2017, 16:57
Re: SQLite Improved - by SecretMax - 15.07.2017, 15:17
Re: SQLite Improved - by Phцnix - 17.08.2017, 13:18
Re: SQLite Improved - by Sasino97 - 03.06.2018, 11:27

Forum Jump:


Users browsing this thread: 12 Guest(s)