Help around the register system
#1

I am using Kush's register system based on Y_INI.

Everything is going good, it writes the data to the .ini file, I can register and log-in properly but there's one problem.

Whenever I press quit or ESC at the dialogs, the server immediately shuts down. I don't really know why... I copy-pasted his tutorial properly, didn't touch 1 bit.

I get these errors in the server log with crashdetect.dll included:
Код:
[22:53:00] [debug] Server crashed while executing jdfreeroam.amx
[22:53:00] [debug] AMX backtrace:
[22:53:00] [debug] #0 native CallLocalFunction () from samp-server.exe
[22:53:00] [debug] #1 0000e5b4 in public OnDialogResponse (30, 2, 0, -1, 2078908) from jdfreeroam.amx
[22:53:00] [debug] Native backtrace:
[22:53:00] [debug] #0 0047467c in ?? () from samp-server.exe
[22:53:00] [debug] #1 004010b6 in ?? () from samp-server.exe
[22:53:00] [debug] #2 71c0c6fa in ?? () from plugins\crashdetect.DLL
[22:53:00] [debug] #3 71c12278 in ?? () from plugins\crashdetect.DLL
[22:53:00] [debug] #4 71c0a0d7 in ?? () from plugins\crashdetect.DLL
[22:53:00] [debug] #5 71c0c74a in ?? () from plugins\crashdetect.DLL
[22:53:00] [debug] #6 0046ec31 in ?? () from samp-server.exe
[22:53:00] [debug] #7 00452270 in ?? () from samp-server.exe
[22:53:00] [debug] #8 71c0c74a in ?? () from plugins\crashdetect.DLL
[22:53:00] [debug] #9 0046e8d0 in ?? () from samp-server.exe
[22:53:00] [debug] #10 0049eef9 in ?? () from samp-server.exe
[22:53:00] [debug] #11 0045ad2a in ?? () from samp-server.exe
[22:53:00] [debug] #12 7719658c in ?? () from C:\Windows\SYSTEM32\ntdll.dll
Any help? Thanks
Reply
#2

Anyone?
Reply
#3

help...
Reply
#4

Try another script... If it again crashes then it's something to you...
Maybe
Reply
#5

Quote:
Originally Posted by nemanjasepa
Посмотреть сообщение
Try another script... If it again crashes then it's something to you...
Maybe
I have tried his SII tutorial too, still crashing, I have also tried other dialogs, but they're all the same and I can't see the problem.

The script is fine:

pawn Код:
if(dialogid == DIALOG_REGISTER || dialogid == DIALOG_LOGIN)
    {
        if(dialogid == DIALOG_REGISTER)
        {
            if(response == 0)
        {
        SendClientMessage(playerid, COLORRED, "You have been kicked out automatically.");
        Kick(playerid);
        }
            if(response)
            {
                new reg[256];
        format(reg, sizeof(reg),""COL_WHITE"This username is not registered, please enter a valid password below to register:\n\n{00FFFF}Name{FFFFFF}: %s\n\n{00FFFF}Password{FFFFFF}:", UnderscoreToSpaceName(playerid));
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"{00FFFF}Registering...",reg,"Register","Quit");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_Close(File);
               

                TogglePlayerSpectating(playerid, 0);
            }
        }
        else if(dialogid == DIALOG_LOGIN)
        {
            if(response == 0)
        {
        SendClientMessage(playerid, COLORRED, "You have been kicked out automatically.");
        Kick(playerid);
        }
            if(response)
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    TogglePlayerSpectating(playerid, 0);
                }
                else
                {
                    new login[256];
            format(login, sizeof(login),""COL_WHITE"You have entered a wrong password. Please enter your correct password below:\n\n{00FFFF}Name{FFFFFF}: %s\n\n{00FFFF}Password{FFFFFF}:", UnderscoreToSpaceName(playerid));
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"{00FFFF}Login",login,"Login","Quit");
                }
                return 1;
            }
        }
    }
Reply
#6

Halp
Reply
#7

create a file like "server.cfg" at pawno directory and write on it "-d3" then open pawno and open your gamemode - complie it , run it and it will give you the right line of the problem
Reply
#8

Fixed - dialogs.inc messed it up for some reason.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)