Kres servera nakon davanja lidera

Započeo predator.exe, Jun 26, 2020, 17:47:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Kada nekome dam lidera bilo koje org server se crash-uje
Deo skripte: Dacu deo iz server loga
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
[pawn] /[17:42:11] [debug] Server crashed while executing Cvetic.amx
[17:42:11] [debug] AMX backtrace:
[17:42:11] [debug] #0 native fread () in samp-server.exe
[17:42:11] [debug] #1 006280b4 in public UcitajLidere () in Cvetic.amx
[17:42:11] [debug] #2 00060c14 in public WC_OnGameModeInit () in Cvetic.amx
[17:42:11] [debug] #3 00041de8 in public SSCANF_OnGameModeInit () in Cvetic.amx
[17:42:11] [debug] #4 000324b8 in public Itter_OnGameModeInit () in Cvetic.amx
[17:42:11] [debug] #5 native CallLocalFunction () in samp-server.exe
[17:42:11] [debug] #6 00020dac in ?? () in Cvetic.amx
[17:42:11] [debug] #7 0000a2f4 in public ScriptInit_OnGameModeInit () in Cvetic.amx
[17:42:11] [debug] #8 00004544 in public OnGameModeInit () in Cvetic.amx
[17:42:11] [debug] Native backtrace:
[17:42:11] [debug] #0 76f3e835 in ?? () in C:\Windows\SYSTEM32\ntdll.dll
[17:42:11] [debug] #1 00498bb8 in ?? () in samp-server.exe
[17:42:11] [debug] #2 004991e0 in ?? () in samp-server.exe
[17:42:11] [debug] #3 00404f14 in ?? () in samp-server.exe
[17:42:11] [debug] Registers:
[17:42:11] [debug] EAX: 00000024 EBX: 00000040 ECX: 00000020 EDX: 003cd000
[17:42:11] [debug] ESI: 0602a134 EDI: 0602b158 EBP: 00000000 ESP: 0019f3d8
[17:42:11] [debug] EIP: 00404f14 EFLAGS: 00010206
[17:42:11] [debug] Stack:
[17:42:11] [debug] ESP+00000000: 00000000 0019f3f4 0602a134 00000040
[17:42:11] [debug] ESP+00000020: 6a16373c 00405802 00000000 00000040
[17:42:11] [debug] ESP+00000040: 00000093 00000000 00000093 00000000
[17:42:11] [debug] ESP+00000060: 0602a138 004057a0 0232fb00 01e2d7bc
[17:42:11] [debug] ESP+00000080: 00000000 0019f48c 004010b6 0232fb00
[17:42:11] [debug] ESP+000000a0: 00000028 0019f628 0602a134 0232fb00
[17:42:11] [debug] ESP+000000c0: 00000028 0019f628 0602a134 6b933fa7
[17:42:11] [debug] ESP+000000e0: 0232fb00 00000000 01e2d8bc 006280b4
[17:42:11] [debug] ESP+00000100: 76f4d9b5 76f4d94f 00000020 0248557c
[17:42:11] [debug] ESP+00000120: 00000045 024800c0 0248029c ffffffff
[17:42:11] [debug] ESP+00000140: 00310031 0019f5b8 022c54d4 0019f5b0
[17:42:11] [debug] ESP+00000160: 02480000 00000128 00730103 0053005c
[17:42:11] [debug] ESP+00000180: 005907d0 00000064 023bedb8 0064002e
[17:42:11] [debug] ESP+000001a0: 0019f628 0602a134 00000000 00000002
[17:42:11] [debug] ESP+000001c0: 01e2d8bc 0232fb00 041631f8 6b933fa7
[17:42:11] [debug] ESP+000001e0: 69e5dc92 00000028 0019f628 0602a134
[17:42:11] [debug] ESP+00000200: 0019f628 0602a134 0000059f 02286c98
[17:42:11] [debug] ESP+00000220: 0232fb00 00000000 03b3b144 01e2bc0c
[17:42:11] [debug] ESP+00000240: 01e2c7a0 01e2c798 0019f684 69e597cc
[17:42:11] [debug] ESP+00000260: 0232fb00 0000059f 0019fae8 00000000
[17:42:11] [debug] ESP+00000280: 0019f678 0232fb00 00000001 01e2fbdc
[17:42:11] [debug] ESP+000002a0: 69e57df6 0019f684 022866e0 0019f698
[17:42:11] [debug] ESP+000002c0: 0019f6e0 6a144885 0232fb00 0019fb38
[17:42:11] [debug] ESP+000002e0: 00656700 02488000 0019fb0c 6a144753
[17:42:11] [debug] ESP+00000300: 00000000 0132fb00 0019fb48 004746be
[17:42:11] [debug] ESP+00000320: 6e4f5f72 656d6147 65646f4d 74696e49
[17:42:11] [debug] ESP+00000340: 00000000 00000000 00000000 00000000
[17:42:11] [debug] ESP+00000360: 00000000 00000000 00000000 00000000
[17:42:11] [debug] ESP+00000380: 0019f7f0 76f847c8 0019f798 76f84882
[17:42:11] [debug] ESP+000003a0: 0019faa4 00000000 005e46b8 005e46b8
[17:42:11] [debug] ESP+000003c0: 00000000 76f4e18c 76ad1334 76f4e1bc
[17:42:11] [debug] ESP+000003e0: 76ad1334 00000000 896ce53c 0019f7f4
[17:42:11] [debug] Loaded modules:
[17:42:11] [debug] 00400000 - 00519000 samp-server.exe
[17:42:11] [debug] 76f00000 - 770a2000 ntdll.dll
[17:42:11] [debug] 75b30000 - 75c20000 KERNEL32.DLL
[17:42:11] [debug] 768f0000 - 76b03000 KERNELBASE.dll
[17:42:11] [debug] 76200000 - 767a7000 SHELL32.dll
[17:42:11] [debug] 75ab0000 - 75b2b000 msvcp_win.dll
[17:42:11] [debug] 75230000 - 75350000 ucrtbase.dll
[17:42:11] [debug] 75900000 - 75a93000 USER32.dll
[17:42:11] [debug] 75540000 - 75558000 win32u.dll
[17:42:11] [debug] 75cb0000 - 75cd3000 GDI32.dll
[17:42:11] [debug] 75370000 - 7544a000 gdi32full.dll
[17:42:11] [debug] 74910000 - 74918000 WSOCK32.dll
[17:42:11] [debug] 76140000 - 761ff000 msvcrt.dll
[17:42:11] [debug] 73d10000 - 73d38000 WINMM.dll
[17:42:11] [debug] 75800000 - 75863000 WS2_32.dll
[17:42:11] [debug] 75010000 - 750ca000 RPCRT4.dll
[17:42:11] [debug] 74fe0000 - 75005000 IMM32.DLL
[17:42:11] [debug] 69e40000 - 69e91000 crashdetect.DLL
[17:42:11] [debug] 69dd0000 - 69e39000 MSVCP100.dll
[17:42:11] [debug] 63be0000 - 63c9e000 MSVCR100.dll
[17:42:11] [debug] 6a140000 - 6a17f000 streamer.DLL
[17:42:11] [debug] 63b60000 - 63bd1000 MSVCP120.dll
[17:42:11] [debug] 63a70000 - 63b5e000 MSVCR120.dll
[17:42:11] [debug] 10000000 - 1000e000 sscanf.DLL
[17:42:11] [debug] 74a20000 - 74a34000 VCRUNTIME140.dll
[17:42:11] [debug] 6a050000 - 6a08a000 SKY.DLL
[17:42:11] [debug] 767b0000 - 767b6000 PSAPI.DLL
[17:42:11] [debug] 74d80000 - 74dd2000 mswsock.dll
[17:42:11] [debug] 71470000 - 71481000 napinsp.dll
[17:42:11] [debug] 754b0000 - 75525000 sechost.dll
[17:42:11] [debug] 71450000 - 71466000 pnrpnsp.dll
[17:42:11] [debug] 74a10000 - 74a20000 wshbth.dll
[17:42:12] [debug] 71430000 - 71446000 NLAapi.dll
[17:42:12] [debug] 749c0000 - 749f2000 IPHLPAPI.DLL
[17:42:12] [debug] 71490000 - 71520000 DNSAPI.dll
[17:42:12] [debug] 75530000 - 75537000 NSI.dll
[17:42:12] [debug] 73f60000 - 73f6e000 winrnr.dll
[17:42:12] [debug] 74b00000 - 74b58000 fwpuclnt.dll
[17:42:12] [debug] 75ce0000 - 75cf9000 bcrypt.dll
[17:42:12] [debug] 71420000 - 71428000 rasadhlp.dll
[17:42:12] [debug] 74ee0000 - 74f3c000 bcryptPrimitives.dll
/[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem):  Imate debug iz server loga



Citat: Claus poslato Jun 26, 2020, 23:22:47 POSLE PODNE
Daj komandu za davanje lidera
[pawn]CMD:makeleader(playerid,params[])
{
    if(PI[playerid][pAdmin] < 4) return SEM( playerid, "Ne mozes to!" );
   new id, lider, fajl;
   if(sscanf(params, "uii", id, lider, fajl))
   {
      SKP(playerid, "/makeleader (playerid) (orgid) (fajl (0/1))" );
      SCM( playerid, -1, "(ID 1.)"COL_SERVER" MUP");
      SCM( playerid, -1, "(ID 2.)"COL_SERVER" SAJ");
      SCM( playerid, -1, "(ID 3.)"COL_SERVER" RTB");
      SCM( playerid, -1, "(ID 4.)"COL_SERVER" Zemunski klan");
      SCM( playerid, -1, "(ID 5.)"COL_SERVER" Los Surenos 13");
      SCM( playerid, -1, "(ID 6.)"COL_SERVER" Zelenasi");
      SCM( playerid, -1, "(ID 7.)"COL_SERVER" Zvezdarska ekipa");
      SCM( playerid, -1, "(ID 8.)"COL_SERVER" Skaljarski klan");
      SCM( playerid, -1, "(ID 9.)"COL_SERVER" Novobeogradski klan");
      SCM( playerid, -1, "(ID 10.)"COL_SERVER" Surcinski klan");
      SCM( playerid, -1, "(ID 11.)"COL_SERVER" Zandarmerija");
      SCM( playerid, -1, "(ID 12.)"COL_SERVER" Pink Panteri");
      return true;
   }
   if(lider < 0 || lider > 12) return SEM( playerid, "Ne moze manje od 0 ili vise od 12!" );
      
    if(lider == 0)
   {
      SetPlayerSkin(id, 59); PI[id][pSkin] = 59; PI[id][pLeader] = 0;
   }
   if(lider == 1)
   {
      SetPlayerSkin(id, 265); PI[id][pSkin] = 265; PI[id][pLeader] = LIDER_MUP;
   }
   if(lider == 2)
   {
      SetPlayerSkin(id, 286); PI[id][pSkin] = 286; PI[id][pLeader] = LIDER_SAJ;
   }
   if(lider == 3)
   {
      SetPlayerSkin(id, 147); PI[id][pSkin] = 147; PI[id][pLeader] = LIDER_RTB;
   }
   if(lider == 4)
   {
      SetPlayerSkin(id, 113); PI[id][pSkin] = 113; PI[id][pLeader] = LIDER_ZK;
   }
   if(lider == 5)
   {
      SetPlayerSkin(id, 174); PI[id][pSkin] = 174; PI[id][pLeader] = LIDER_VE;
   }
   if(lider == 6)
   {
      SetPlayerSkin(id, 271); PI[id][pSkin] = 271; PI[id][pLeader] = LIDER_ZELENASI;
   }
   if(lider == 7)
   {
      SetPlayerSkin(id, 124); PI[id][pSkin] = 124; PI[id][pLeader] = LIDER_ZE;
   }
    if(lider == 8)
   {
      SetPlayerSkin(id, 292); PI[id][pSkin] = 292; PI[id][pLeader] = LIDER_SK;
   }
   if(lider == 9)
   {
      SetPlayerSkin(id, 110); PI[id][pSkin] = 110; PI[id][pLeader] = LIDER_NK;
   }
   if(lider == 10)
   {
      SetPlayerSkin(id, 46); PI[id][pSkin] = 46; PI[id][pLeader] = LIDER_SURCIN;
   }
   if(lider == 11)
   {
      SetPlayerSkin(id, 165); PI[id][pSkin] = 165; PI[id][pLeader] = LIDER_ZANDAR;
   }
   if(lider == 12)
   {
      SetPlayerSkin(id, 104); PI[id][pSkin] = 104; PI[id][pLeader] = LIDER_PANTERI;
   }
   PI[id][pMember] = 0;
   PI[id][pRank] = 0;
   PI[id][pUgovor] = 0;
   // ====================================================================== //
   if(PI[id][pLeader] > 0) {
   if(lider == 0) {
   if(fajl == 1) {
   new ldst[128];
   format(ldst,128,"LIDERI/%d.txt",PI[id][pLeader]);
   new text[80];
   format(text,64,"Niko" );
   new File:log;
   log = fopen(ldst, io_write);
   fwrite(log, text);
   fclose(log); } } }
   // ====================================================================== //
   if(PI[id][pLeader] == LIDER_MUP || PI[id][pLeader] == LIDER_SAJ)
   {
      PI[id][pSwat] = 4;
   }
   else
   {
       PI[id][pSwat] = 0;
   }
   PolicajacNaDuznosti[id] = 0;
   Bojice(id);
   PI[id][pSuspend] = 0;
   // ====================================================================== //
   if(lider != 0) {
   if(fajl == 1) {
   new ldst[128];
   format(ldst,128,"LIDERI/%d.txt",lider);
   new text[80];
   format(text,64,"%s",GetNameEx(id));
   new File:log;
   log = fopen(ldst, io_write);
   fwrite(log, text);
   fclose(log); } }
    // ====================================================================== //
   new fs[3]; if(fajl == 0) { fs = "Ne"; } else if(fajl == 1) { fs = "Da"; }
    // ====================================================================== //
   if(lider > 0) {
   SCMF(id, -1, ""COL_SERVER"VG: {FFFFFF}Admin %s ti je dao lidera organizacije [ID:%d].", GetName( playerid ), lider);
   new str[256];
   format(str,256,"{F3FF02}[INFO] Admin %s je dao gradjaninu %s lidera organizacije [ID:%d], pisanje u fajl: %s!", GetName( playerid ), GetName(id), lider, fs);
   PAdm(ZUTA, str, 1); }
   // ====================================================================== //
   else if(lider == 0) {
   SCMF(id, -1, ""COL_SERVER"VG: {FFFFFF}Admin %s ti je skinuo lidera vase organizacije.", GetName( playerid ));
   new str[256];
   format(str,256,"{F3FF02}[INFO] Admin %s je skinuo gradjaninu %s lidera njegove organizacije, pisanje u fajl: %s!", GetName( playerid ), GetName(id), fs);
   PAdm(ZUTA, str, 1); }
   // ====================================================================== //
   SaveAccount(id);
   UcitajLidere();
   return true;
}[/pawn]

Daj kod za UcitajLidere i imaš li errora/warninga u skripti?

Citat: Claus poslato Jun 27, 2020, 10:14:03 PRE PODNE
Daj kod za UcitajLidere i imaš li errora/warninga u skripti?

[pawn]//UcitajLidere();[/pawn]

Nema Warninga ni Errora.

Ne postoji ti taj fajl u scriptfiles/LIDERI/id.ini , moras da stavis io_readwrite da bi kreiralo fajl ako ne postoji, a kod tebe je samo io_write.

Citat: TarikBrt poslato Jun 27, 2020, 16:07:08 POSLE PODNE
Ne postoji ti taj fajl u scriptfiles/LIDERI/id.ini , moras da stavis io_readwrite da bi kreiralo fajl ako ne postoji, a kod tebe je samo io_write.
Fajl i .ini fajlovi postoje, promenio sam u io_readwrite ali ponovo isti problem...

Jel .ini ili .txt ? Koliko vidim ti spremas .txt filetype, a ne .ini ?

Edit: Daj citavu funkciju UcitajLidere()
Poslednja Izmena: Jun 27, 2020, 17:34:39 POSLE PODNE od TarikBrt

Citat: TarikBrt poslato Jun 27, 2020, 17:32:26 POSLE PODNE
Jel .ini ili .txt ? Koliko vidim ti spremas .txt filetype, a ne .ini ?

Edit: Daj citavu funkciju UcitajLidere()
Popravljeno.

Lock.