Server Crashing (Sorry for being vague)
#1

Basically what happens is somewhere along the register process the server decides to crash. Here's the stock for the register process;
pawn Код:
stock RegisterProcess(playerid)
{
    new string[256];
    switch(pRegStep[playerid])
    {
        case 1:
        {
            SCM(playerid, COLOR_MESSAGE, "We will be walking you through a small introduction to the script and ask you a few...");
            SCM(playerid, COLOR_MESSAGE, "... Questions about you and your character. This will take no more than a few minutes.");
            SCM(playerid, COLOR_MESSAGE, "Make sure you use the MONTH/DAY/YEAR format, using forward slashes.");
            SCM(playerid, COLOR_NICERED, "Keep in mind that choosing \"quit\" will kick you.");
            SPD(playerid, DIALOG_DOB, DIALOG_STYLE_INPUT, "Date of Birth", "Please enter your {F0CD81}character's{FFFFFF} date of birth.", "Okay", "Quit");
            PlayerPlaySound(playerid, 1054, 0, 0, 0);
            return 1;
        }
        case 2:
        {
            format(string, sizeof(string), "Good, so you are %d years old and you were born on %s", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pDOB]);
            SCM(playerid, COLOR_MESSAGE, string);
            SPD(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "Gender", "What sex is your {F0CD81}character{FFFFFF}?", "Male", "Female");
            PlayerPlaySound(playerid, 1054, 0, 0, 0);
            return 1;
        }
        case 3:
        {
            new genstr[12];
            if(PlayerInfo[playerid][pGender]) { genstr = "male"; }
            if(!PlayerInfo[playerid][pGender]) { genstr = "female"; }
            format(string, sizeof(string), "Alright, so you are a %s", genstr);
            SCM(playerid, COLOR_MESSAGE, string);
            SPD(playerid, DIALOG_EYECOLOR, DIALOG_STYLE_LIST, "Eye Color", "{FF0000}What color are your eyes?{FFFFFF}\r\nAmber\r\nBlue\r\nBrown\r\nGray\r\nGreen\r\nHazel", "Okay", "Quit");
            PlayerPlaySound(playerid, 1054, 0, 0, 0);
            return 1;
        }
        case 4:
        {
            format(string, sizeof(string), "Your eyes are colored %s, sounds good.", EyeColors[PlayerInfo[playerid][pEyeColor]]);
            SCM(playerid, COLOR_MESSAGE, string);
            format(string, sizeof(string), "{FF0000}What color is your hair?{FFFFFF}\r\nBlack\r\nBrown\r\nBlond\r\nAuburn\r\nChestnut\r\nRed\r\nGray/White");
            SPD(playerid, DIALOG_HAIRCOL, DIALOG_STYLE_LIST, "Hair Color", string, "Okay", "Quit");
            PlayerPlaySound(playerid, 1054, 0, 0, 0);
            return 1;
        }
        case 5:
        {
            format(string, sizeof(string), "You said your hair color was %s, alright.", HairColors[PlayerInfo[playerid][pHairColor]]);
            SCM(playerid, COLOR_MESSAGE, string);
            SCM(playerid, COLOR_MESSAGE, "Now there is just one last thing we need to know, what would you like your phone number to be?");
            SCM(playerid, COLOR_MESSAGE, "Enter the last four digits, the prefix (the first three) are 405, your phone number will be...");
            SCM(playerid, COLOR_MESSAGE, "... \"405-xxxx\", assuming it isn't already taken by someone.");
            SCM(playerid, COLOR_MESSAGE, "{FF0000}NOTE:{FFFFFF}This will not take effect until you buy a cell phone.");
            SPD(playerid, DIALOG_PHONENUM, DIALOG_STYLE_INPUT, "Phone number", "Follow the messages sent to you and enter your desired phone number...\r\n405- ...", "Okay", "Quit");
            PlayerPlaySound(playerid, 1054, 0, 0, 0);
            return 1;
        }
        case 6:
        {
            format(string, sizeof(string), "You chose %d as the last four digits of your phone number, your phone number is now %s", pRegPhone[playerid], PlayerInfo[playerid][pPhoneNumber]);
            SCM(playerid, COLOR_MESSAGE, string);
            SCM(playerid, COLOR_MESSAGE, "Now all you have to do is click \"I AGREE\" and you can get to playing!");
            SPD(playerid, DIALOG_AGREE, DIALOG_STYLE_MSGBOX, "Agreement", "By click agree you acknowledge that if you break {5D849C}/rules{FFFFFF} at any time\r\nyou will be punished accordingly, you also agree that you are mature enough\r\nto play on a server and game with many mature themes.", "I agree", "I DO NOT agree");
            PlayerPlaySound(playerid, 1054, 0, 0, 0);
            return 1;
        }
    }
    return 1;
}
At first I thought it was something under here, then that turned out to not be the case, so then I went to the specific step I got stuck on in the dialog (which was the first step, entering the DOB.) Commented that out, still crashes. So then I decided to comment out the whole entire OnDialogResponse callback.. Still crashes. I ******d it and remembered that fopen crashes on an invalid handle (like the file not existing.) So I checked the include I'm using to save files (Southclaw's INI File Script) and everything there checks out. I'm confused , so any help would be appreciated.

(Also here are server_log.txt and crashinfo.txt, both I deleted before I ran the server so that's the only thing that's going to be on them.)
pawn Код:
--------------------------

SA-MP Server: 0.3x



Exception At Address: 0x53736C46 Module: (Unknown)



Registers:

EAX: 0x0012ECD8 EBX: 0x00000000 ECX: 0x00000000 EDX: 0x004056F0

ESI: 0x00000000 EDI: 0x0000004E EBP: 0x00656572 ESP: 0x004B1C9C

EFLAGS: 0x00010286



Stack:

+0000: 0x61567465   0x0065756C   0x47736C46   0x61567465

+0010: 0x0065756C   0x41736C46   0x636F6C6C   0x00000000

+0020: 0x6E72656B   0x32336C65   0x6C6C642E   0x00000000

+0030: 0x00000000   0xFFFFFFFF   0x00000000   0x00498C6C

+0040: 0x00000000   0xFFFFFFFF   0x00000000   0x00498F29

+0050: 0x00000000   0xFFFFFFFF   0x00000000   0x00499236

+0060: 0x00000000   0xFFFFFFFF   0x00000000   0x00499339

+0070: 0x00000000   0xFFFFFFFF   0x00000000   0x004999BC

+0080: 0x00000000   0xFFFFFFFF   0x00000000   0x00499BF2

+0090: 0x00000000   0x00000000   0x00499BCC   0xFFFFFFFF

+00A0: 0x00000000   0x00499F98   0x00000000   0xFFFFFFFF

+00B0: 0x00000000   0x0049A0A0   0x30302B65   0x00000030

+00C0: 0x00000000   0xC0000000   0x4150017E   0x80000000

+00D0: 0x4147FFFF   0x72507349   0x7365636F   0x46726F73

+00E0: 0x75746165   0x72506572   0x6E657365   0x00000074

+00F0: 0x4E52454B   0x32334C45   0x00000000   0x00000000

+0100: 0x7FF00000   0x00000000   0xFFF00000   0x00000000

+0110: 0x7FE00000   0x00000000   0x00200000   0x00000000

+0120: 0x00000000   0x00000000   0x80000000   0x7F800000

+0130: 0xFF800000   0x7FC00000   0xFFC00000   0x00000000



--------------------------



Loaded Modules:

samp-server.exe A: 0x00400000 - 0x004F4000  (C:\Users\Gavin\Documents\Scripts (ZARP, BSRP, NADM)\samp-server.exe)

ntdll.dll   A: 0x774C0000 - 0x775FC000  (C:\Windows\SYSTEM32\ntdll.dll)

kernel32.dll    A: 0x75910000 - 0x759E4000  (C:\Windows\system32\kernel32.dll)

KERNELBASE.dll  A: 0x757B0000 - 0x757FA000  (C:\Windows\system32\KERNELBASE.dll)

SHELL32.dll A: 0x76490000 - 0x770D9000  (C:\Windows\system32\SHELL32.dll)

msvcrt.dll  A: 0x75AD0000 - 0x75B7C000  (C:\Windows\system32\msvcrt.dll)

SHLWAPI.dll A: 0x77140000 - 0x77197000  (C:\Windows\system32\SHLWAPI.dll)

GDI32.dll   A: 0x76240000 - 0x7628E000  (C:\Windows\system32\GDI32.dll)

USER32.dll  A: 0x772A0000 - 0x77369000  (C:\Windows\system32\USER32.dll)

LPK.dll A: 0x77650000 - 0x7765A000  (C:\Windows\system32\LPK.dll)

USP10.dll   A: 0x76290000 - 0x7632D000  (C:\Windows\system32\USP10.dll)

WSOCK32.dll A: 0x70C40000 - 0x70C47000  (C:\Windows\system32\WSOCK32.dll)

WS2_32.dll  A: 0x76030000 - 0x76065000  (C:\Windows\system32\WS2_32.dll)

RPCRT4.dll  A: 0x771F0000 - 0x77291000  (C:\Windows\system32\RPCRT4.dll)

NSI.dll A: 0x75B80000 - 0x75B86000  (C:\Windows\system32\NSI.dll)

WINMM.dll   A: 0x734E0000 - 0x73512000  (C:\Windows\system32\WINMM.dll)

IMM32.DLL   A: 0x77600000 - 0x7761F000  (C:\Windows\system32\IMM32.DLL)

MSCTF.dll   A: 0x77370000 - 0x7743C000  (C:\Windows\system32\MSCTF.dll)

nativechecker.DLL   A: 0x72730000 - 0x72735000  (C:\Users\Gavin\Documents\Scripts (ZARP, BSRP, NADM)\plugins\nativechecker.DLL)

MSVCP100.dll    A: 0x6F110000 - 0x6F179000  (C:\Windows\system32\MSVCP100.dll)

MSVCR100.dll    A: 0x6D5B0000 - 0x6D66F000  (C:\Windows\system32\MSVCR100.dll)

mswsock.dll A: 0x75050000 - 0x7508C000  (C:\Windows\system32\mswsock.dll)

wshtcpip.dll    A: 0x74BA0000 - 0x74BA5000  (C:\Windows\System32\wshtcpip.dll)

DNSAPI.dll  A: 0x74F10000 - 0x74F54000  (C:\Windows\system32\DNSAPI.dll)

mdnsNSP.dll A: 0x6F8D0000 - 0x6F8F1000  (C:\Program Files\Bonjour\mdnsNSP.dll)

Iphlpapi.DLL    A: 0x73340000 - 0x7335C000  (C:\Windows\system32\Iphlpapi.DLL)

WINNSI.DLL  A: 0x73330000 - 0x73337000  (C:\Windows\system32\WINNSI.DLL)

NLAapi.dll  A: 0x73630000 - 0x73640000  (C:\Windows\system32\NLAapi.dll)

winrnr.dll  A: 0x6F930000 - 0x6F938000  (C:\Windows\System32\winrnr.dll)

napinsp.dll A: 0x6F920000 - 0x6F930000  (C:\Windows\system32\napinsp.dll)

sechost.dll A: 0x77620000 - 0x77639000  (C:\Windows\SYSTEM32\sechost.dll)

pnrpnsp.dll A: 0x6F900000 - 0x6F912000  (C:\Windows\system32\pnrpnsp.dll)

rasadhlp.dll    A: 0x6F8C0000 - 0x6F8C6000  (C:\Windows\system32\rasadhlp.dll)

wship6.dll  A: 0x75040000 - 0x75046000  (C:\Windows\System32\wship6.dll)



--------------------------

SA-MP Server: 0.3x



Exception At Address: 0x77505E6C Module: (ntdll.dll)



Registers:

EAX: 0x00100000 EBX: 0x0012FCE0 ECX: 0x00000001 EDX: 0x000007FF

ESI: 0x00106378 EDI: 0x014C0000 EBP: 0x00000000 ESP: 0x0012FD94

EFLAGS: 0x00010202



Stack:

+0000: 0x757B179C   0x00000074   0x00000000   0x757B17C4

+0010: 0x8D4B2E0F   0x7595EFA0   0x00000074   0x00000000

+0020: 0x77504C1C   0x757B1876   0x00000000   0x757B189F

+0030: 0x8D4B2DEF   0x7595EFA0   0x7595F26E   0x00000000

+0040: 0x00000024   0x00000001   0x00000000   0x00000000

+0050: 0x00000000   0x00000000   0x00000000   0x00000000

+0060: 0x00000000   0x014C9578   0x7595EFA0   0x0044F082

+0070: 0xC27E3CB8   0x000882FD   0x0012FEA4   0x004A417B

+0080: 0xFFFFFFFF   0x0048C03C   0x7595EFA0   0x014C9578

+0090: 0x0048C22C   0x7595F26E   0x00000000   0x3BA7E364

+00A0: 0x0048886D   0x00000000   0x00001DB0   0x0012FF88

+00B0: 0x7FFD8000   0x00008000   0x00010101   0x00000019

+00C0: 0x00001E61   0x00000078   0x00001C00   0x014C9578

+00D0: 0x656D6167   0x65646F6D   0x00003531   0x004BB014

+00E0: 0x004BB010   0x7FFD8000   0x004A4D70   0x0012FE70

+00F0: 0x0012FF78   0x0012FF78   0x00496BF8   0x004B17E8

+0100: 0xFFFFFFFF   0x00494E91   0x00494EA1   0x004A4D70

+0110: 0x0012FF78   0x004A4A21   0xFFFFFFFF   0x00496696

+0120: 0x00000001   0x014C1528   0x014C1580   0x00000094

+0130: 0x00000006   0x00000001   0x00001DB0   0x00000002



--------------------------



Loaded Modules:

samp-server.exe A: 0x00400000 - 0x004F4000  (C:\Users\Gavin\Documents\Scripts (ZARP, BSRP, NADM)\samp-server.exe)

ntdll.dll   A: 0x774C0000 - 0x775FC000  (C:\Windows\SYSTEM32\ntdll.dll)

kernel32.dll    A: 0x75910000 - 0x759E4000  (C:\Windows\system32\kernel32.dll)

KERNELBASE.dll  A: 0x757B0000 - 0x757FA000  (C:\Windows\system32\KERNELBASE.dll)

SHELL32.dll A: 0x76490000 - 0x770D9000  (C:\Windows\system32\SHELL32.dll)

msvcrt.dll  A: 0x75AD0000 - 0x75B7C000  (C:\Windows\system32\msvcrt.dll)

SHLWAPI.dll A: 0x77140000 - 0x77197000  (C:\Windows\system32\SHLWAPI.dll)

GDI32.dll   A: 0x76240000 - 0x7628E000  (C:\Windows\system32\GDI32.dll)

USER32.dll  A: 0x772A0000 - 0x77369000  (C:\Windows\system32\USER32.dll)

LPK.dll A: 0x77650000 - 0x7765A000  (C:\Windows\system32\LPK.dll)

USP10.dll   A: 0x76290000 - 0x7632D000  (C:\Windows\system32\USP10.dll)

WSOCK32.dll A: 0x70C40000 - 0x70C47000  (C:\Windows\system32\WSOCK32.dll)

WS2_32.dll  A: 0x76030000 - 0x76065000  (C:\Windows\system32\WS2_32.dll)

RPCRT4.dll  A: 0x771F0000 - 0x77291000  (C:\Windows\system32\RPCRT4.dll)

NSI.dll A: 0x75B80000 - 0x75B86000  (C:\Windows\system32\NSI.dll)

WINMM.dll   A: 0x734E0000 - 0x73512000  (C:\Windows\system32\WINMM.dll)

IMM32.DLL   A: 0x77600000 - 0x7761F000  (C:\Windows\system32\IMM32.DLL)

MSCTF.dll   A: 0x77370000 - 0x7743C000  (C:\Windows\system32\MSCTF.dll)

nativechecker.DLL   A: 0x72730000 - 0x72735000  (C:\Users\Gavin\Documents\Scripts (ZARP, BSRP, NADM)\plugins\nativechecker.DLL)

MSVCP100.dll    A: 0x6F110000 - 0x6F179000  (C:\Windows\system32\MSVCP100.dll)

MSVCR100.dll    A: 0x6D5B0000 - 0x6D66F000  (C:\Windows\system32\MSVCR100.dll)

mswsock.dll A: 0x75050000 - 0x7508C000  (C:\Windows\system32\mswsock.dll)

wshtcpip.dll    A: 0x74BA0000 - 0x74BA5000  (C:\Windows\System32\wshtcpip.dll)

DNSAPI.dll  A: 0x74F10000 - 0x74F54000  (C:\Windows\system32\DNSAPI.dll)

mdnsNSP.dll A: 0x6F8D0000 - 0x6F8F1000  (C:\Program Files\Bonjour\mdnsNSP.dll)

Iphlpapi.DLL    A: 0x73340000 - 0x7335C000  (C:\Windows\system32\Iphlpapi.DLL)

WINNSI.DLL  A: 0x73330000 - 0x73337000  (C:\Windows\system32\WINNSI.DLL)

NLAapi.dll  A: 0x73630000 - 0x73640000  (C:\Windows\system32\NLAapi.dll)

winrnr.dll  A: 0x6F930000 - 0x6F938000  (C:\Windows\System32\winrnr.dll)

napinsp.dll A: 0x6F920000 - 0x6F930000  (C:\Windows\system32\napinsp.dll)

sechost.dll A: 0x77620000 - 0x77639000  (C:\Windows\SYSTEM32\sechost.dll)

pnrpnsp.dll A: 0x6F900000 - 0x6F912000  (C:\Windows\system32\pnrpnsp.dll)

rasadhlp.dll    A: 0x6F8C0000 - 0x6F8C6000  (C:\Windows\system32\rasadhlp.dll)

wship6.dll  A: 0x75040000 - 0x75046000  (C:\Windows\System32\wship6.dll)
pawn Код:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3x, (C)2005-2013 SA-MP Team

[09:40:22]
[09:40:22] Server Plugins
[09:40:22] --------------
[09:40:22]  Loading plugin: nativechecker
[09:40:22]   Loaded.
[09:40:22]  Loading plugin: crashdetect
[09:40:22]   CrashDetect v4.10 is OK.
[09:40:22]   Loaded.
[09:40:22]  Loaded 2 plugins.

[09:40:22]
[09:40:22] Filterscripts
[09:40:22] ---------------
[09:40:22]   Loaded 0 filterscripts.

[09:40:23]  
[09:40:23]  
[09:40:23]  
[09:40:23]  =======================================
[09:40:23]  |                                     |
[09:40:23]  |        YSI version 1.06.0002        |
[09:40:23]  |        By Alex "******" Cole        |
[09:40:23]  |                                     |
[09:40:23]  =======================================
[09:40:23]  
[09:40:23]  
[09:40:23]  
[09:40:23]  
[09:40:23] [DEBUG]: 18 classes loaded
[09:40:23] Dillimore County Roleplay •••• By Gavin Baker
[09:40:23] Number of vehicle models: 0
[09:40:23] New version of CrashDetect is available for download (4.10.1)
[09:40:58] Incoming connection: 127.0.0.1:52626
[09:40:58] [join] Ash_Whitlock has joined the server (0:127.0.0.1)
[09:40:58] Ash Whitlock (0) has connected to the server!
[09:41:07] [COMMAND]: Ash Whitlock (0) sent /register *Hurhurhurnope*
[09:41:07] [debug] Server crashed while executing rp.amx
[09:41:07] [debug] AMX backtrace:
[09:41:07] [debug] #0 native fclose () [004056f0] from samp-server.exe
[09:41:07] [debug] #1 0001ab50 in ?? () from rp.amx
[09:41:07] [debug] #2 00039c90 in public cmd_register () from rp.amx
[09:41:07] [debug] #3 native CallLocalFunction () [00471c30] from samp-server.exe
[09:41:07] [debug] #4 00006128 in public FIXES_OnPlayerCommandText () from rp.amx
[09:41:07] [debug] #5 native CallLocalFunction () [00471c30] from samp-server.exe
[09:41:07] [debug] #6 00000e38 in public OnPlayerCommandText () from rp.amx
[09:41:07] [debug] System backtrace:
[09:41:07] [debug] #0 004056fd in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #1 69e6340a in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #2 69e65aa6 in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #3 69e5d621 in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #4 69e6345a in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #5 00471f3e in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #6 004010b6 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #7 69e6340a in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #8 69e65aa6 in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #9 69e5d621 in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #10 69e6345a in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #11 00471f3e in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #12 004010b6 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #13 69e6340a in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #14 69e65aa6 in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #15 69e5d621 in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #16 69e6345a in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #17 0046c970 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #18 00452710 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #19 77511faf in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[09:41:07] [debug] #20 7595f1ac in ?? () from C:\Windows\system32\kernel32.dll
[09:41:07] [debug] #21 004a3d0e in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #22 68106ac3 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #23 004b1c78 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #24 ffe2aae8 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #25 00498a29 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #26 46736c46 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #27 00656572 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #28 53736c46 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] Server crashed while executing rp.amx
[09:41:07] [debug] AMX backtrace:
[09:41:07] [debug] #0 native fclose () [004056f0] from samp-server.exe
[09:41:07] [debug] #1 0001ab50 in ?? () from rp.amx
[09:41:07] [debug] #2 00039c90 in public cmd_register () from rp.amx
[09:41:07] [debug] #3 native CallLocalFunction () [00471c30] from samp-server.exe
[09:41:07] [debug] #4 00006128 in public FIXES_OnPlayerCommandText () from rp.amx
[09:41:07] [debug] #5 native CallLocalFunction () [00471c30] from samp-server.exe
[09:41:07] [debug] #6 00000e38 in public OnPlayerCommandText () from rp.amx
[09:41:07] [debug] System backtrace:
[09:41:07] [debug] #0 77512e7d in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[09:41:07] [debug] #1 77512d68 in ?? () from C:\Windows\SYSTEM32\ntdll.dll
[09:41:07] [debug] #2 7595f1ac in ?? () from C:\Windows\system32\kernel32.dll
[09:41:07] [debug] #3 00492801 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #4 0044e0d9 in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #5 0045876c in ?? () from C:\Users\Gavin\Documents\Scripts\samp-server.exe
[09:41:07] [debug] #6 69e60860 in ?? () from C:\Users\Gavin\Documents\Scripts\plugins\crashdetect.DLL
[09:41:07] [debug] #7 77505e6c in ?? () from C:\Windows\SYSTEM32\ntdll.dll
Reply
#2

Do you use a command /register to register? If yes, can you show us the code in it.
Reply
#3

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Do you use a command /register to register? If yes, can you show us the code in it.
Here you go;
pawn Код:
CMD:register(playerid, params[])
{
    if(PlayerInfo[playerid][pRegistered]) return SCM(playerid, COLOR_ERROR, "[ERROR]: You're already registered. Use {5D849C}/acp {968996}to change your password.");
    if(isnull(params)) return SCM(playerid, COLOR_ERROR, "[USAGE]: /register [password]");
    new string[256];
    if(strlen(params) > MAX_PASSWORD)
    {
        format(string, sizeof(string), "Your password cannot be longer than %d characters.", MAX_PASSWORD);
        SCM(playerid, COLOR_ERROR, string);
        return 1;
    }
    PlayerInfo[playerid][pPassword] = num_hash(params);
    format(string, sizeof(string), "You have registered this account (%s) with the password {F0CD81}%s{309E21}. Don't forget it!", RPName(playerid), params);
    SCM(playerid, COLOR_GREEN, string);
    SCM(playerid, COLOR_GREEN, "You will now be walked through the basics of this server.");
    pRegStep[playerid] = 1;
    RegisterProcess(playerid);
    if(!fexist(FilePath(0, playerid))) { file_Create(FilePath(0, playerid)); }
    FileLoaded[0][playerid] = true;
    SaveFile(0, playerid);
    return 1;
}
Reply
#4

The errors come from the command and probably from this
pawn Код:
if(!fexist(FilePath(0, playerid))) { file_Create(FilePath(0, playerid)); }
Or something from the custom functions.

First of all, does "FilePath(0, playerid)" return the string with the file's name and file's extension?

When the file exists, returns false otherwise it creates the file and it does return true. Try to use
pawn Код:
if(file_Create(FilePath(0, playerid)) == 1)
{
    FileLoaded[0][playerid] = true;
    SaveFile(0, playerid);
}
else print("That file already exists.");
return 1;
If that won't work either, you have to debug your code. Any line of the command, stocks and the dialogs and see where the code stops.

Last, another question. I noticed that you ask for the date's birthday here
pawn Код:
SPD(playerid, DIALOG_DOB, DIALOG_STYLE_INPUT, "Date of Birth", "Please enter your {F0CD81}character's{FFFFFF} date of birth.", "Okay", "Quit");
and then you send a message with these:
pawn Код:
format(string, sizeof(string), "Good, so you are %d years old and you were born on %s", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pDOB]);
What they hold these variables? - PlayerInfo[playerid][pAge] and PlayerInfo[playerid][pDOB]

I didn't see anywhere to convert the date of B-day to his age and then set it to the first variable.
Reply
#5

I took Raven's age/DOB code and made mine similar (it works, and at the time I couldn't think of any other way to do it that would work)
pawn Код:
if(dialogid == DIALOG_DOB)
    {
        if(!response) { PlayerPlaySound(playerid, 1055, 0, 0, 0); SCM(playerid, COLOR_RED, "You chose \"QUIT\", and have been kicked from the server."); Kick(playerid); }
        if(response)
        {
            getdate(year, month, day);
            new dinfo[3][20];
            new age = year-strval(dinfo[2]);
            split(inputtext, dinfo, '/');
            if(strval(dinfo[2]) < 1 || strval(dinfo[2]) > 12)
            {
                PlayerPlaySound(playerid, 1055, 0, 0, 0);
                SCM(playerid, COLOR_ERROR, "Try again, make sure you are using the correct format.");
                RegisterProcess(playerid);
                return 1;
            }
            if(strval(dinfo[1]) > month) { age--; }
            if(strval(dinfo[0]) > day && strval(dinfo[1]) == month) { age--; }
            PlayerInfo[playerid][pAge] = age;
            strmid(PlayerInfo[playerid][pDOB], inputtext, 0, strlen(inputtext), 255);
            pRegStep[playerid] = 2;
            PlayerPlaySound(playerid, 1054, 0, 0, 0);
            RegisterProcess(playerid);
        }
    }
And for the FilePath, it works off of the type, and target's ID. So let's say I wanted to save a vehicle, that's type 1, and the ID would be vehicle's ID.. Etcetera, pretty simple and self explanatory.
pawn Код:
stock FilePath(type, targetid)
{
    new string[256];
    switch(type)
    {
        case 0: format(string, sizeof(string), "/dcrp/accounts/%s.ini",                 RPName(targetid));
        case 1: format(string, sizeof(string), "/dcrp/properties/houses/%d.ini",        targetid);
        case 2: format(string, sizeof(string), "/dcrp/properties/businesses/%d.ini",    targetid);
        case 3: format(string, sizeof(string), "/dcrp/vehicles/%d.ini",                 targetid);
        case 4: format(string, sizeof(string), "/dcrp/accounts/Fake IDs/%s.ini",        FakeIDInfo[targetid][fName]);
        case 5: format(string, sizeof(string), "/dcrp/global.var");
    }
    return string;
}
Reply
#6

Okay, I see. Try the if statement about creating the file and if it does not work and it still crashes the server, then debug your code. I can no longer help you unless you find out where your code stops working.
Reply
#7

Alright, it still crashes. I do think I have an idea of what the problem is.
[10:47:50] [COMMAND]: Ash Whitlock (0) sent /register test
[10:47:50] [debug] Server crashed while executing dcrp.amx
[10:47:50] [debug] AMX backtrace:
[10:47:50] [debug] #0 native fclose () [004056f0] from samp-server.exe
[10:47:50] [debug] #1 0001ad40 in ?? () from dcrp.amx
[10:47:50] [debug] #2 0003a4c0 in public cmd_register () from dcrp.amx
[10:47:50] [debug] #3 native CallLocalFunction () [00471c30] from samp-server.exe
[10:47:50] [debug] #4 00006128 in public FIXES_OnPlayerCommandText () from dcrp.amx
[10:47:50] [debug] #5 native CallLocalFunction () [00471c30] from samp-server.exe

It might be the fixes include, I'll continue on to debug though. I'm not sure what I did, I had fixes.inc and everything running smoothly and getting along just fine. I just can't ercall what I added before this started happening.
Reply
#8

I used to have issues with the FIXES plugin, but the include is fine as long as I use it. Debug always is the solution for such as problems!
Reply
#9

Alright so the problem was the file creating under /register. I created a work around and now it all works fine. Thanks for the help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)