[HELP] Server crash -
cr33d - 16.01.2014
When i add something to my CMD: spodesavanja and type it every time IG he crash and i sverv.log i have found thi
Код:
[13:23:51] [debug] Server crashed while executing FarkiasRP.amx
[13:23:51] [debug] AMX backtrace:
[13:23:51] [debug] #0 native format () [00470dd0] from samp-server.exe
[13:23:51] [debug] #1 00381e88 in SCMF (playerid=0, color=-1, fstring[]=@0x0126e204 "{00C0FF}[INFO]: {C0C0C0}Regist...", ... <5 arguments>) at C:\Users\Nikola\Downloads\BSRP made by Bauer\BSRP v1.1 made by Bauer\gamemodes\FarkiasRP.pwn:35272
[13:23:51] [debug] #2 0039a8f4 in public cmd_spodesavanja (playerid=0, params[]=@0x012ec13c "") at C:\Users\Nikola\Downloads\BSRP made by Bauer\BSRP v1.1 made by Bauer\gamemodes\FarkiasRP.pwn:36716
[13:23:51] [debug] #3 native CallLocalFunction () [00471e90] from samp-server.exe
[13:23:51] [debug] #4 0001d3cc in ?? (... <2 arguments>) at C:\Users\Nikola\Desktop\pawno\include\zcmd.inc:102
[13:23:51] [debug] #5 00009154 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x012ec104 "/spodesavanja") at C:\Users\Nikola\Desktop\pawno\include\YSI\y_hooks/impl.inc:929
[13:23:51] [debug] Native backtrace:
[13:23:51] [debug] #0 0046c010 in ?? () from C:\Users\Nikola\Downloads\BSRP made by Bauer\BSRP v1.1 made by Bauer\samp-server.exe
Code which i sworking before i edit him (not crash):
Код:
CMD:spodesavanja(playerid, params[])
{
//#pragma unused help
//"pragma unused params
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"UP:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""SPLAVA"[UP:RP] "SIVA"Samo Vlasnik!");
if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[UP:RP] "SIVA"Morate biti na admin duznosti!");
SPD(playerid, DIALOG_SPODESAVANJA, DIALOG_STYLE_LIST, ""SPLAVA"Podesavanja", "Registracija (ON/OFF)\nOglas (ON/OFF)\nAdmin Pitanja (ON/OFF)\nAdmin Report (ON/OFF)", "Odabir", "Izlaz");
new z[13]; if(ServerInfo[isRegistracija] == 1) z = "Onemogucena"; else z = "Omogucena";
new o[13]; if(ServerInfo[isOglas] == 1) o = "Iskljucen"; else o = "Ukljucen";
new c[13]; if(ServerInfo[isPitanja] == 1) c = "Iskljucen"; else c = "Ukljucen";
new r[13]; if(ServerInfo[isReport] == 1) r = "Iskljucen"; else r = "Ukljucen";
SCMF(playerid,-1,""SPLAVA"[INFO]: "SIVA"Registracija: %s | Oglas: %s | Pitanja: %s | Report: %s",z,o,c,r);
return 1;
}
Code with a crash:
CMD

podesavanja(playerid, params[])
{
//#pragma unused help
//#pragma unused params
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"BS:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""SPLAVA"[BS:RP] "SIVA"Samo Vlasnik!");
if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[BS:RP] "SIVA"Morate biti na admin duznosti!");
SPD(playerid, DIALOG_SPODESAVANJA, DIALOG_STYLE_LIST, ""SPLAVA"Podesavanja", "Registracija (ON/OFF)\nOglas (ON/OFF)\nAdmin Pitanja (ON/OFF)\nAdmin Report (ON/OFF)\nkupovina Vozila (ON/OFF)", "Odabir", "Izlaz");
new z[13]; if(ServerInfo[isRegistracija] == 1) z = "Onemogucena"; else z = "Omogucena";
new o[13]; if(ServerInfo[isOglas] == 1) o = "Iskljucen"; else o = "Ukljucen";
new c[13]; if(ServerInfo[isPitanja] == 1) c = "Iskljucen"; else c = "Ukljucen";
new r[13]; if(ServerInfo[isReport] == 1) r = "Iskljucen"; else r = "Ukljucen";
new k[13]; if(ServerInfo[isKupovinaVozila] == 1) k = "Iskljucen"; else k = "Ukljucen";
SCMF(playerid,-1,""SPLAVA"[INFO]: "SIVA"Registracija: %s | Oglas: %s | Pitanja: %s | Report: %s | Kupovina vozila: %s",z,o,c,r,k);
return 1;
}
please help me
Re: [HELP] Server crash -
AF1_CLAN - 16.01.2014
Look at the CMD part, you forgot this ( : )
Try this code:
Код:
CMD:podesavanja(playerid, params[]) // you didn't add the ( : )
{
//#pragma unused help
//#pragma unused params
if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"BS:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""SPLAVA"[BS:RP] "SIVA"Samo Vlasnik!");
if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"[BS:RP] "SIVA"Morate biti na admin duznosti!");
SPD(playerid, DIALOG_SPODESAVANJA, DIALOG_STYLE_LIST, ""SPLAVA"Podesavanja", "Registracija (ON/OFF)\nOglas (ON/OFF)\nAdmin Pitanja (ON/OFF)\nAdmin Report (ON/OFF)\nkupovina Vozila (ON/OFF)", "Odabir", "Izlaz");
new z[13]; if(ServerInfo[isRegistracija] == 1) z = "Onemogucena"; else z = "Omogucena";
new o[13]; if(ServerInfo[isOglas] == 1) o = "Iskljucen"; else o = "Ukljucen";
new c[13]; if(ServerInfo[isPitanja] == 1) c = "Iskljucen"; else c = "Ukljucen";
new r[13]; if(ServerInfo[isReport] == 1) r = "Iskljucen"; else r = "Ukljucen";
new k[13]; if(ServerInfo[isKupovinaVozila] == 1) k = "Iskljucen"; else k = "Ukljucen";
SCMF(playerid,-1,""SPLAVA"[INFO]: "SIVA"Registracija: %s | Oglas: %s | Pitanja: %s | Report: %s | Kupovina vozila: %s",z,o,c,r,k);
return 1;
}
AF1_CLAN
Re: [HELP] Server crash -
Konstantinos - 16.01.2014
The crash caused by SCMF function. Can you post it?
Re: [HELP] Server crash -
cr33d - 16.01.2014
No, he still crashes and post this:
Код:
[13:40:55] [debug] Server crashed while executing FarkiasRP.amx
[13:40:55] [debug] AMX backtrace:
[13:40:55] [debug] #0 native format () [00470dd0] from samp-server.exe
[13:40:55] [debug] #1 00381e88 in SCMF (playerid=0, color=-1, fstring[]=@0x0126e204 "{00C0FF}[INFO]: {C0C0C0}Regist...", ... <5 arguments>) at C:\Users\Nikola\Downloads\BSRP made by Bauer\BSRP v1.1 made by Bauer\gamemodes\FarkiasRP.pwn:35272
[13:40:55] [debug] #2 0039a8f4 in public cmd_spodesavanja (playerid=0, params[]=@0x012ec13c "") at C:\Users\Nikola\Downloads\BSRP made by Bauer\BSRP v1.1 made by Bauer\gamemodes\FarkiasRP.pwn:36716
[13:40:55] [debug] #3 native CallLocalFunction () [00471e90] from samp-server.exe
[13:40:55] [debug] #4 0001d3cc in ?? (... <2 arguments>) at C:\Users\Nikola\Desktop\pawno\include\zcmd.inc:102
[13:40:55] [debug] #5 00009154 in public OnPlayerCommandText (playerid=0, cmdtext[]=@0x012ec104 "/spodesavanja") at C:\Users\Nikola\Desktop\pawno\include\YSI\y_hooks/impl.inc:929
[13:40:55] [debug] Native backtrace:
[13:40:55] [debug] #0 0046c010 in ?? () from C:\Users\Nikola\Downloads\BSRP made by Bauer\BSRP v1.1 made by Bauer\samp-server.exe
Re: [HELP] Server crash -
AF1_CLAN - 16.01.2014
EDIT, i removed the code, i found some problems, bare with me.
Re: [HELP] Server crash -
cr33d - 16.01.2014
Oh yes konstantinos here is:
Код:
SCMF(playerid,-1,""SPLAVA"[INFO]: "SIVA"Registracija: %s | Oglas: %s | Pitanja: %s | Report: %s | Kupovina vozila: %s",z,o,c,r,k);
This is SCMF after editing
Re: [HELP] Server crash -
Konstantinos - 16.01.2014
AF1_CLAN, the command is /spodesavanja, hence: CMD:spodesavanja(playerid, params[])
The forum just replaced :s with a smiley..
And the crash as I said before caused by format native in SCMF function. Post the code of the SCMF function and not the line of the command uses SCMF.
Re: [HELP] Server crash -
cr33d - 16.01.2014
Did you mean on this
Код:
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);
}
else return SCM(playerid,color,fstring);
}
Re: [HELP] Server crash -
AF1_CLAN - 16.01.2014
Edit: You reply pretty fast, I'm taking a look at the stocks.
Oh yes, I forgot about that aha.
Edited the code inside and I've noticed the SCMF, it's supposed to be SCM right (SendClientMessage I suppose)? So i changed that too. Lets use sa-mp defaults instead and try this
Edit 2: Oh nvm, scmf is good now that i see the stocks, i will give it a try.
Use this instead:
Код:
CMD:podesavanja(playerid, params[]) // you didn't add the ( : )
{
//#pragma unused help
//#pragma unused params
if(UlogovanProvera[playerid] == 0) return SendClientMessage(playerid,-1,"BS:RP | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid,-1,"SPLAVA"[BS:RP] "SIVA"Samo Vlasnik!");
if(AdminDuty[playerid] == 0) return SendClientMessage(playerid,-1,"CRVENA"[BS:RP] "SIVA"Morate biti na admin duznosti!");
SPD(playerid, DIALOG_SPODESAVANJA, DIALOG_STYLE_LIST, "SPLAVA"Podesavanja", "Registracija (ON/OFF)\nOglas (ON/OFF)\nAdmin Pitanja (ON/OFF)\nAdmin Report (ON/OFF)\nkupovina Vozila (ON/OFF)", "Odabir", "Izlaz");
new z[13]; if(ServerInfo[isRegistracija] == 1) z = "Onemogucena"; else z = "Omogucena";
new o[13]; if(ServerInfo[isOglas] == 1) o = "Iskljucen"; else o = "Ukljucen";
new c[13]; if(ServerInfo[isPitanja] == 1) c = "Iskljucen"; else c = "Ukljucen";
new r[13]; if(ServerInfo[isReport] == 1) r = "Iskljucen"; else r = "Ukljucen";
new k[13]; if(ServerInfo[isKupovinaVozila] == 1) k = "Iskljucen"; else k = "Ukljucen";
SendClientMessage(playerid,-1,"SPLAVA"[INFO]: "SIVA"Registracija: %s | Oglas: %s | Pitanja: %s | Report: %s | Kupovina vozila: %s",z,o,c,r,k);
return 1;
}
AF1_CLAN
Re: [HELP] Server crash -
AF1_CLAN - 16.01.2014
Oops, could of edited my post before.
Try this code and tell me.
Код:
SCMF(playerid,-1,"SPLAVA[INFO]: SIVA Registracija: %s | Oglas: %s | Pitanja: %s | Report: %s | Kupovina vozila: %s",z,o,c,r,k);
Can you even
Compile your server? If it shows errors then don't ignore them and post them here.