SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 23/05/2017, 03:33 PM   #11
fireranger11
Big Clucker
 
Join Date: Dec 2016
Location: Paksitan
Posts: 55
Reputation: 0
Default Re: Server crash on command

Code:
stock SavePlayerCoords(playerid)
{
  if(IsPlayerConnected(playerid))
  {
    new Float:x,Float:y,Float:z,Float:a,Float:health,Float:armour;
    GetPlayerPos(playerid,x,y,z);
    GetPlayerFacingAngle(playerid,a);
    GetPlayerHealth(playerid,health);
	GetPlayerArmour(playerid,armour);
    SetPVarFloat(playerid,"xpos",x);
    SetPVarFloat(playerid,"ypos",y);
    SetPVarFloat(playerid,"zpos",z);
    SetPVarFloat(playerid,"apos",a);
    SetPVarInt(playerid,"ipos",GetPlayerInterior(playerid));
    SetPVarInt(playerid,"vpos",GetPlayerVirtualWorld(playerid));
    for( new w=0; w < 13; w++ ) GetPlayerWeaponData( playerid, w, pWeapons[playerid][w], pAmmo[playerid][w] );
  }
  return 1;
}
fireranger11 is offline   Reply With Quote
Old 23/05/2017, 04:00 PM   #12
Affan
Huge Clucker
 
Affan's Avatar
 
Join Date: Dec 2012
Posts: 396
Reputation: 28
Default Re: Server crash on command

Try put a print before initializing a new function to debug which piece of code is actually crashing the server.
Affan is offline   Reply With Quote
Old 23/05/2017, 04:07 PM   #13
fireranger11
Big Clucker
 
Join Date: Dec 2016
Location: Paksitan
Posts: 55
Reputation: 0
Default Re: Server crash on command

Tell me how :c im a newbie
fireranger11 is offline   Reply With Quote
Old 23/05/2017, 04:10 PM   #14
Dice_
Huge Clucker
 
Dice_'s Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 321
Reputation: 39
Default Re: Server crash on command

http://wiki.sa-mp.com/wiki/Print
just an example:
PHP Code:
stock SavePlayerCoords(playerid)
{
print(
"called[1].");  
if(
IsPlayerConnected(playerid))
  {
    print(
"called[2].");
    new 
Float:x,Float:y,Float:z,Float:a,Float:health,Float:armour;
    
GetPlayerPos(playerid,x,y,z);
    
GetPlayerFacingAngle(playerid,a);
    
GetPlayerHealth(playerid,health);
    
GetPlayerArmour(playerid,armour);
    
SetPVarFloat(playerid,"xpos",x);
    
SetPVarFloat(playerid,"ypos",y);
    
SetPVarFloat(playerid,"zpos",z);
    
SetPVarFloat(playerid,"apos",a);
    
SetPVarInt(playerid,"ipos",GetPlayerInterior(playerid));
    
SetPVarInt(playerid,"vpos",GetPlayerVirtualWorld(playerid));
    for( new 
w=013w++ ) GetPlayerWeaponDataplayeridwpWeapons[playerid][w], pAmmo[playerid][w] );
  }
  return 
1;

I don't know if it's right or not though.
__________________
203.114.74.56:7777


Dice_ is offline   Reply With Quote
Old 23/05/2017, 06:13 PM   #15
fireranger11
Big Clucker
 
Join Date: Dec 2016
Location: Paksitan
Posts: 55
Reputation: 0
Default Re: Server crash on command

Code:
[23:02:30] called[1].
[23:02:30] called[2].
[23:02:31] [debug] Server crashed while executing usfMain.amx
[23:02:31] [debug] AMX backtrace:
[23:02:31] [debug] #0 00000074 in public TF_TimerTick () from usfMain.amx
[23:02:33] [debug] Native backtrace:
[23:02:33] [debug] #0 72a1338f in ?? () from plugins\crashdetect.DLL
[23:02:33] [debug] #1 72a0a767 in ?? () from plugins\crashdetect.DLL
[23:02:33] [debug] #2 72a0d65a in ?? () from plugins\crashdetect.DLL
[23:02:33] [debug] #3 724f51b9 in ?? () from plugins\streamer.DLL
[23:02:33] [debug] #4 00482a68 in ?? () from samp-server.exe
[23:02:33] [debug] #5 004912ba in ?? () from samp-server.exe
[23:02:33] [debug] Registers:
[23:02:33] [debug] EAX: 064be188 EBX: 00000001 ECX: 00000061 EDX: 065621c4
[23:02:33] [debug] ESI: 02b82fa8 EDI: 064be1f8 EBP: 00000000 ESP: 0019fe18
[23:02:33] [debug] EIP: 004912ba EFLAGS: 00010293
[23:02:33] [debug] Stack:
[23:02:33] [debug] ESP+00000000: 0000000e 7503eca0 7503ec50 00000000
[23:02:33] [debug] ESP+00000020: 0019ff80 00399000 0001401c 00010101
[23:02:33] [debug] ESP+00000040: 00b29d20 656d6167 65646f6d 00003531
[23:02:33] [debug] ESP+00000060: 0019fe68 0019ff70 0019ff70 0049d208
[23:02:33] [debug] ESP+00000080: 004ab4a0 0019ff70 004ab0e1 ffffffff
[23:02:33] [debug] ESP+000000a0: 00000094 00000006 00000002 000023f0
[23:02:33] [debug] ESP+000000c0: 00000000 00000000 00000000 00000000
[23:02:33] [debug] ESP+000000e0: 00000000 00000000 00000000 00000000
[23:02:33] [debug] ESP+00000100: 00000000 00000000 00000000 00000000
[23:02:33] [debug] ESP+00000120: 00000000 00000000 00000000 00000000
[23:02:33] [debug] ESP+00000140: 00000000 00000000 c0000005 00000000
[23:02:33] [debug] ESP+00000160: 004ba530 00000000 0019ff94 74fe8744
[23:02:33] [debug] ESP+00000180: 77c0587d 00399000 765f4809 00000000
[23:02:33] [debug] ESP+000001a0: 00000000 00000000 765f4809 0019ffa0
[23:02:33] [debug] ESP+000001c0: 00000000 0019ffec 77c0584d ffffffff
[23:02:33] [debug] ESP+000001e0: 00399000 00000000 78746341 00000020
[23:02:33] [debug] ESP+00000200: 00000020 00000000 00000014 00000001
[23:02:33] [debug] ESP+00000220: 00000000 00000000 00000000 00000000
[23:02:33] [debug] ESP+00000240: 00000044 000002e0 00000254 00000000
[23:02:33] [debug] ESP+00000260: 00000336 00000000 2d59495b 000008b8
[23:02:33] [debug] ESP+00000280: 32ceeacd 00000bdc 00000042 00000c20
[23:02:33] [debug] ESP+000002a0: 0000005e 00000fa4 00000356 00000000
[23:02:33] [debug] ESP+000002c0: 00000386 00000010 00000009 000000ec
[23:02:33] [debug] ESP+000002e0: 00000001 00000002 00001714 000007a0
[23:02:33] [debug] ESP+00000300: 00000001 00000004 00002d40 00000314
[23:02:33] [debug] ESP+00000320: 00000002 00000006 000030ec 000000cc
[23:02:33] [debug] ESP+00000340: 00000001 00000009 000032a8 00000028
[23:02:33] [debug] ESP+00000360: 00000001 64487353 0000002c 00000001
[23:02:33] [debug] ESP+00000380: 00000001 00001560 0000002c 0000005e
[23:02:33] [debug] ESP+000003a0: 00000000 00000000 00000000 00000000
[23:02:33] [debug] ESP+000003c0: 00000038 00000000 003a0043 0057005c
[23:02:33] [debug] ESP+000003e0: 006e0069 00780053 005c0073 00000000
[23:02:33] [debug] Loaded modules:
[23:02:33] [debug] 00400000 - 00519000 samp-server.exe
[23:02:33] [debug] 77ba0000 - 77d2e000 ntdll.dll
[23:02:33] [debug] 74fd0000 - 750a0000 KERNEL32.DLL
[23:02:33] [debug] 77050000 - 77212000 KERNELBASE.dll
[23:02:33] [debug] 75280000 - 765c8000 SHELL32.dll
[23:02:33] [debug] 74820000 - 748dd000 msvcrt.dll
[23:02:33] [debug] 76fa0000 - 76fd9000 cfgmgr32.dll
[23:02:33] [debug] 74c10000 - 74d28000 ucrtbase.dll
[23:02:33] [debug] 74f30000 - 74fbc000 shcore.dll
[23:02:33] [debug] 77ae0000 - 77ba0000 RPCRT4.dll
[23:02:33] [debug] 74670000 - 74690000 SspiCli.dll
[23:02:33] [debug] 74660000 - 7466a000 CRYPTBASE.dll
[23:02:33] [debug] 74bb0000 - 74c07000 bcryptPrimitives.dll
[23:02:33] [debug] 748e0000 - 74921000 sechost.dll
[23:02:33] [debug] 76d60000 - 76f98000 combase.dll
[23:02:33] [debug] 77460000 - 779e4000 windows.storage.dll
[23:02:33] [debug] 74ea0000 - 74f17000 advapi32.dll
[23:02:33] [debug] 750c0000 - 75105000 shlwapi.dll
[23:02:33] [debug] 74d30000 - 74d51000 GDI32.dll
[23:02:33] [debug] 75120000 - 75279000 gdi32full.dll
[23:02:33] [debug] 77a00000 - 77a79000 msvcp_win.dll
[23:02:33] [debug] 74d60000 - 74e9c000 USER32.dll
[23:02:33] [debug] 750a0000 - 750b6000 win32u.dll
[23:02:33] [debug] 75110000 - 7511e000 kernel.appcore.dll
[23:02:33] [debug] 77410000 - 77455000 powrprof.dll
[23:02:33] [debug] 768a0000 - 768b0000 profapi.dll
[23:02:33] [debug] 74530000 - 74538000 WSOCK32.dll
[23:02:33] [debug] 773a0000 - 77407000 WS2_32.dll
[23:02:33] [debug] 72be0000 - 72c04000 WINMM.dll
[23:02:33] [debug] 72b10000 - 72b33000 WINMMBASE.dll
[23:02:33] [debug] 77280000 - 772a5000 IMM32.DLL
[23:02:33] [debug] 729f0000 - 72a40000 crashdetect.DLL
[23:02:33] [debug] 6b3c0000 - 6b429000 MSVCP100.dll
[23:02:33] [debug] 74050000 - 7410f000 MSVCR100.dll
[23:02:33] [debug] 725b0000 - 725fa000 irc.DLL
[23:02:33] [debug] 72c10000 - 72c25000 VCRUNTIME140.dll
[23:02:34] [debug] 72540000 - 725ad000 MSVCP140.dll
[23:02:34] [debug] 724f0000 - 72538000 streamer.DLL
[23:02:34] [debug] 71c50000 - 71cc1000 MSVCP120.dll
[23:02:34] [debug] 71b60000 - 71c4e000 MSVCR120.dll
[23:02:34] [debug] 71b10000 - 71b53000 mysql.DLL
[23:02:34] [debug] 711e0000 - 712b6000 MSVCR110.dll
[23:02:34] [debug] 71150000 - 711d5000 MSVCP110.dll
[23:02:34] [debug] 10000000 - 1023e000 LIBMYSQL.dll
[23:02:34] [debug] 73aa0000 - 73ab1000 napinsp.dll
[23:02:34] [debug] 73a80000 - 73a96000 pnrpnsp.dll
[23:02:34] [debug] 73a60000 - 73a73000 NLAapi.dll
[23:02:34] [debug] 73e60000 - 73eae000 mswsock.dll
[23:02:34] [debug] 739c0000 - 73a3f000 DNSAPI.dll
[23:02:34] [debug] 74fc0000 - 74fc7000 NSI.dll
[23:02:34] [debug] 74540000 - 7456f000 IPHLPAPI.DLL
[23:02:34] [debug] 739b0000 - 739bb000 winrnr.dll
[23:02:34] [debug] 73980000 - 739a1000 mdnsNSP.dll
[23:02:34] [debug] 73970000 - 73978000 rasadhlp.dll
[23:02:34] [debug] 028c0000 - 028cc000 Whirlpool.DLL
[23:02:34] [debug] 72c30000 - 72ccb000 MSVCR80.dll
[23:02:34] [debug] 02b00000 - 02b0f000 sscanf.DLL
[23:02:34] [debug] 73570000 - 73575000 nativechecker.DLL
[23:02:34] [debug] 73920000 - 7396a000 fwpuclnt.dll
[23:02:34] [debug] 74110000 - 74128000 bcrypt.dll
[23:02:34] [debug] 73430000 - 734a8000 uxtheme.dll
[23:02:34] [debug] 72cd0000 - 72d50000 tiptsf.dll
[23:02:34] [debug] 74a10000 - 74aa6000 OLEAUT32.dll
[23:02:34] [debug] 74ab0000 - 74ba3000 ole32.dll
[23:02:34] [debug] 73790000 - 738f4000 PROPSYS.dll
[23:02:34] [debug] 76cd0000 - 76d53000 clbcatq.dll
[23:02:34] [debug] 69090000 - 690cc000 edputil.dll
[23:02:34] [debug] 6d730000 - 6d8cb000 urlmon.dll
[23:02:34] [debug] 70580000 - 70791000 iertutil.dll
[23:02:34] [debug] 68ef0000 - 68f51000 msiso.dll
fireranger11 is offline   Reply With Quote
Old 23/05/2017, 06:27 PM   #16
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,060
Reputation: 126
Default Re: Server crash on command

Open your pawno folder, create pawn.cfg file and add -d3 inside it. Recompile your script, start server, use command to crash it. Send crash log here.
__________________
Путин here,
Путин there,
Путин просто everywhere.
DRIFT_HUNTER is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server crash after using command. jimdo Scripting Help 5 05/08/2016 05:59 PM
Server Crash with AFK command Eymeric69 Scripting Help 9 05/05/2016 10:50 AM
Server crash after using command lulo356 Scripting Help 3 07/02/2015 02:34 PM
How to crash my server with command? audifan00 Help Archive 8 15/11/2010 06:10 PM
Command making my server crash Coicatak Help Archive 6 04/03/2009 09:35 AM


All times are GMT. The time now is 11:13 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.