SA-MP Forums Archive
Server crashes on initializing - 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: Server crashes on initializing (/showthread.php?tid=570033)



Server crashes on initializing - BGTrucker - 04.04.2015

I have a problem with a command.When I try to run the server it crashes while initializing.Here is the problematic stuff
pawn Код:
PInfo[playerid][Load]=random(sizeof(Loads));
    while(vtype!=Loads[PInfo[playerid][Load]][VType]) PInfo[playerid][Load]=random(sizeof(Loads));
    PInfo[playerid][LoadLoc][0]=random(Loads[PInfo[playerid][Load]][Loc1][LastLoadedLoc]);
    PInfo[playerid][UnloadLoc][0]=random(Loads[PInfo[playerid][Load]][Loc2][LastLoadedLoc]);
    x=LocInfo[PInfo[playerid][LoadLoc][0]][lX];
    y=LocInfo[PInfo[playerid][LoadLoc][0]][lY];
    z=LocInfo[PInfo[playerid][LoadLoc][0]][lZ];
    PInfo[playerid][JobVeh]=vid;
    PInfo[playerid][JobTr]=tid;
    SetPlayerCheckpoint(playerid,x,y,z,7);
If I remove(or just comment the first 4 lines,the server starts without problems.I tried everything but nothing works.It recompiles perfectly but crashes on initializing.
Just for info-LastLoadedLoc is the sizeof Locations that I have created.I tried replacing it with sizeof(LastLoadedLoc),with random(sizeof(Loads[PInfo[playerid][Load]][Loc1][LastLoadedLoc])); but nothing works.


Re: Server crashes on initializing - Konstantinos - 04.04.2015

Infinite loop.


Re: Server crashes on initializing - BGTrucker - 04.04.2015

This ?
pawn Код:
while(vtype!=Loads[PInfo[playerid][Load]][VType]) PInfo[playerid][Load]=random(sizeof(Loads));
I remove it but still same result.


Re: Server crashes on initializing - BGTrucker - 04.04.2015

Quote:
Originally Posted by ******
Посмотреть сообщение
Get the crash detect plugin, compile with -d3, and see what it says.
This make sense to you ? Cause to me it doesnt mean anything.
Код:
[00:42:20] [debug] Server crashed while executing Transportation_Server.amx
[00:42:20] [debug] AMX backtrace:
[00:42:20] [debug] #0 native format () from samp-server.exe
[00:42:20] [debug] #1 00029948 in public zcmd_OnGameModeInit () from Transportation_Server.amx
[00:42:20] [debug] #2 native CallLocalFunction () from samp-server.exe
[00:42:20] [debug] #3 00006184 in public SSCANF_OnGameModeInit () from Transportation_Server.amx
[00:42:20] [debug] #4 000004ec in public OnGameModeInit () from Transportation_Server.amx
[00:42:20] [debug] Native backtrace:
[00:42:20] [debug] #0 00403334 in ?? () from samp-server.exe
[00:42:20] [debug] #1 74d762ca in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #2 74d78b28 in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #3 74d709c7 in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #4 74d7631a in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #5 74d051a7 in ?? () from plugins\streamer.DLL
[00:42:20] [debug] #6 004732ce in ?? () from samp-server.exe
[00:42:20] [debug] #7 004010b6 in ?? () from samp-server.exe
[00:42:20] [debug] #8 74d762ca in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #9 74d78b28 in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #10 74d709c7 in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #11 74d7631a in ?? () from plugins\crashdetect.DLL
[00:42:20] [debug] #12 74d051a7 in ?? () from plugins\streamer.DLL
[00:42:20] [debug] #13 0046ea94 in ?? () from samp-server.exe
[00:42:20] [debug] #14 65646f6d in ?? () from samp-server.exe
[00:42:20] [debug] #15 72542f73 in ?? () from samp-server.exe
[00:42:20] [debug] #16 70736e61 in ?? () from samp-server.exe
[00:42:20] [debug] #17 6174726f in ?? () from samp-server.exe
[00:42:20] [debug] #18 6e6f6974 in ?? () from samp-server.exe
[00:42:20] [debug] #19 7265535f in ?? () from samp-server.exe
[00:42:20] [debug] #20 2e726576 in ?? () from samp-server.exe
[00:42:20] [debug] #21 00786d61 in ?? ()



Re: Server crashes on initializing - BGTrucker - 04.04.2015

when I made that thing with -d3 it showed me something about line 3079 in the script which is a part of OnGameModeInit callback,and there it formats the location name after the location is loaded from a file.
Here is the whole updated crash report
Код:
[01:11:22] [debug] Server crashed while executing Transportation_Server.amx
[01:11:23] [debug] AMX backtrace:
[01:11:23] [debug] #0 native format () from samp-server.exe
[01:11:23] [debug] #1 00029a80 in public zcmd_OnGameModeInit () at C:\Users\BGTrucker\Desktop\samp03z_svr_R4_win32\gamemodes\Transportation_Server.pwn:3079
[01:11:23] [debug] #2 native CallLocalFunction () from samp-server.exe
[01:11:23] [debug] #3 000061d0 in public SSCANF_OnGameModeInit () at C:\Users\BGTrucker\Desktop\samp03z_svr_R4_win32\pawno\include\zcmd.inc:68
[01:11:23] [debug] #4 00000524 in public OnGameModeInit () at C:\Users\BGTrucker\Desktop\samp03z_svr_R4_win32\pawno\include\sscanf2.inc:174
[01:11:23] [debug] Native backtrace:
[01:11:23] [debug] #0 00403334 in ?? () from samp-server.exe
[01:11:23] [debug] #1 6e7562ca in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #2 6e758b28 in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #3 6e7509c7 in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #4 6e75631a in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #5 74bc51a7 in ?? () from plugins\streamer.DLL
[01:11:23] [debug] #6 004732ce in ?? () from samp-server.exe
[01:11:23] [debug] #7 004010b6 in ?? () from samp-server.exe
[01:11:23] [debug] #8 6e7562ca in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #9 6e758b28 in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #10 6e7509c7 in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #11 6e75631a in ?? () from plugins\crashdetect.DLL
[01:11:23] [debug] #12 74bc51a7 in ?? () from plugins\streamer.DLL
[01:11:23] [debug] #13 0046ea94 in ?? () from samp-server.exe
[01:11:23] [debug] #14 65646f6d in ?? () from samp-server.exe
[01:11:23] [debug] #15 72542f73 in ?? () from samp-server.exe
[01:11:23] [debug] #16 70736e61 in ?? () from samp-server.exe
[01:11:23] [debug] #17 6174726f in ?? () from samp-server.exe
[01:11:23] [debug] #18 6e6f6974 in ?? () from samp-server.exe
[01:11:23] [debug] #19 7265535f in ?? () from samp-server.exe
[01:11:23] [debug] #20 2e726576 in ?? () from samp-server.exe
[01:11:23] [debug] #21 00786d61 in ?? ()



Re: Server crashes on initializing - MP2 - 04.04.2015

Cleaning up your code might help also.

lrn2whitespace