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



Server crashes - Mr.Phillips - 29.05.2017

Hello, my problem is that my server is crashing when I use a certain command, and i do not know why, so thats why i need help.. Here are the details

[23:43:41] [debug] Server crashed while executing samp.amx
[23:43:41] [debug] AMX backtrace:
[23:43:41] [debug] #0 native format () from samp-server.exe
[23:43:41] [debug] #1 0045b8f4 in SCMF (playerid=0, color=869072810, fstring[]=@006b7cb0 "Smenili ste lidera %s na broju %d.", ... <2 arguments>) at C:\Desktop\samp\gamemodes\samp.pwn:58152
[23:43:41] [debug] #2 0049c234 in public cmd_smenilidera (playerid=0, params[]=@007aed0c "1") at C:\Desktop\samp\gamemodes\samp.pwn:62377
[23:43:41] [debug] #3 native CallLocalFunction () from samp-server.exe
[23:43:41] [debug] #4 00000a44 in public OnPlayerCommandText (playerid=0, cmdtext[]=@007aecd0 "/smenilidera 1") at C:\Desktop\samp\pawno\include\zcmd.inc:108
[23:43:41] [debug] Native backtrace:


Re: Server crashes - StrikerZ - 30.05.2017

Show line no 58152 of your gamemode.


Re: Server crashes - Mr.Phillips - 30.05.2017

it's just a stock...

stock SCMF(playerid,color,fstring[],{Float, _}:...)
{
new n=(numargs()-3)*4;
if(n)
{
new message[128],arg_start,arg_end;
#emit CONST.alt fstring
#emit LCTRL 5
#emit ADD
#emit STOR.S.pri arg_start
#emit LOAD.S.alt n
#emit ADD
#emit STOR.S.pri arg_end
do
{
#emit LOAD.I
#emit PUSH.pri
arg_end-=4;
#emit LOAD.S.pri arg_end
}
while(arg_end>arg_start);
#emit PUSH.S fstring
#emit PUSH.C 255
#emit PUSH.ADR message
n+=4*3;
#emit PUSH.S n
#emit SYSREQ.C format
n+=4;
#emit LCTRL 4
#emit LOAD.S.alt n
#emit ADD
#emit SCTRL 4
return SCM(playerid,color,message);

the underlined one is no 58152

It also shows me on server stats an sscanf error - is it possible that those errors cause the server to crash?

http://prntscr.com/fdrfx1