Server crash when logging in
#1

I tryed updating my server from dini to SQLite but when i log in, the server crashes.

Here's the crash info:
Код:
Server crashed while executing GM.amx
[23:29:38] [debug] AMX backtrace:
[23:29:38] [debug] #0 native db_get_field_assoc () [0044de40] from samp-server.exe
[23:29:38] [debug] #1 000426bc in public OnDialogResponse (playerid=0, dialogid=5, response=1, listitem=-1, inputtext[]=@0x00058144 "numelemeu") at D:\Scripting\SAMP\Green Country RP\gamemodes\GM.pwn:4432
[23:29:39] [debug] Native backtrace:
[23:29:39] [debug] #0 0044dae1 in ?? () from samp-server.exe
[23:29:39] [debug] #1 004010b6 in ?? () from samp-server.exe
[23:29:39] [debug] #2 69a458ca in ?? () from plugins\crashdetect.DLL
[23:29:39] [debug] #3 69a4774f in ?? () from plugins\crashdetect.DLL
[23:29:39] [debug] #4 69a40834 in ?? () from plugins\crashdetect.DLL
[23:29:39] [debug] #5 69a4591a in ?? () from plugins\crashdetect.DLL
[23:29:39] [debug] #6 0046de11 in ?? () from samp-server.exe
[23:29:39] [debug] #7 00452970 in ?? () from samp-server.exe
[23:29:39] [debug] #8 7799e023 in ?? () from C:\Windows\SysWOW64\ntdll.dll
[23:29:39] [debug] #9 769e14d1 in ?? () from C:\Windows\syswow64\kernel32.dll
[23:29:39] [debug] #10 004a50fe in ?? () from samp-server.exe
[23:29:39] [debug] #11 68106ac3 in ?? () from samp-server.exe
[23:29:39] [debug] #12 004b3328 in ?? () from samp-server.exe
And here's the login system:
pawn Код:
case DIALOG_LOGIN1:
        {
            if(!response)
            {
                Kick(playerid);
            }
            else
            {
                new pwlength = strlen(inputtext);
                if(pwlength > 0)
                {
                    new buf[145];
                    WP_Hash(buf,sizeof(buf),inputtext);
                    new Query[256], DBResult:Result;
                    FormatQuery(Query, "SELECT * FROM `Users` WHERE `Name` = '%s' AND `Password` = '%s'", Name(playerid), buf);
                    Result = db_query(Database,Query);
                    if(db_num_rows(Result))
                    {
                        new Field[30];
                        db_get_field_assoc(Result, "Email", Field, 30 ); // Line 4432
                        pInfo[playerid][Email] = strval(Field);
                        db_get_field_assoc(Result, "Age", Field, 30 );
                        pInfo[playerid][Age] = strval(Field);
                        db_get_field_assoc(Result, "Admin", Field, 30 );
                        pInfo[playerid][Admin] = strval(Field);
                        db_get_field_assoc(Result, "Money", Field, 30 );
                        pInfo[playerid][Money] = strval(Field);
                        db_get_field_assoc(Result, "WeaponLic", Field, 30 );
                        pInfo[playerid][WeaponLic] = strval(Field);
                        db_get_field_assoc(Result, "Buletin", Field, 30 );
                        pInfo[playerid][Buletin] = strval(Field);
                        db_get_field_assoc(Result, "Faction", Field, 30 );
                        pInfo[playerid][Faction] = strval(Field);
                        db_get_field_assoc(Result, "Rank", Field, 30 );
                        pInfo[playerid][Rank] = strval(Field);
                                        // And so on...
And here's the query for the register system:
pawn Код:
new Query[256];
FormatQuery(Query,"UPDATE `Users` SET (`Email` = '%s',`Money` = '250',`Banned` = '0',`Buletin` = '0',`WeaponLic` = '0',`Sex` = '0',`Age` = '0',`Faction` = '0',`Rank` = '0',`Jailed` = '0',`JailTime` = '0',`Arrests` = '0',`Wanted` = '0',`Deaths` = '0',`Crimes` = '0',`Level` = '1',`RP` = '0',`RobTool` = '0') WHERE `Name` = '%s'",inputtext,Name(playerid));
db_free_result( db_query(Database, Query) );
FormatQuery(Query,"UPDATE `Users` SET (`BankMoney` = '0',`HouseOwned` = '-1',`Fishes` = '0',`Job` = '0',`Clothes` = '0',`Phone` = '0',`PhoneCredit` = '0',`PhoneNumber` = '0',`Phonebook` = '0',`Ceas` = '0',`Momeala` = '0',`GPS` = '0',`TimePlayed` = '0',`Hours` = '0',`Radio` = '0',`PayDayMoney` = '0',`MaxWork` = '0',`posX` = '0',`posY` = '0',`posZ` = '0',`VirtualWorld` = '0',`Interior` = '0') WHERE `Name` = '%s'",Name(playerid));
db_free_result( db_query(Database, Query) );
Thanks.
Reply


Messages In This Thread
Server crash when logging in - by Vlad64 - 26.02.2014, 20:31
Re: Server crash when logging in - by Konstantinos - 26.02.2014, 20:50
Re: Server crash when logging in - by Vlad64 - 27.02.2014, 08:46
Re: Server crash when logging in - by Konstantinos - 27.02.2014, 09:47
Re: Server crash when logging in - by Vlad64 - 28.02.2014, 08:17

Forum Jump:


Users browsing this thread: 1 Guest(s)