Pomoc!

Započeo Fr0z3n, Jul 17, 2020, 15:30:28 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Izbacuje mi neki error ili sta vec debug u conzoli a ne znam sta sam pogresio...
Pawno Code: [Izaberi]
Deo skripte: koji deo treba
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [debug] Run time error 4: "Array index out of bounds"
[debug]  Accessing element at index 55 past array upper bound 54
[debug] AMX backtrace:
[debug] #0 007b376c in UnistiHackTD (playerid=0) at D:\ODACARDA\gamemodes\HL.pwn:61811
[debug] #1 004094e0 in public ac_OnPlayerDisconnect (playerid=0, reason=2) at D:\ODACARDA\gamemodes\HL.pwn:14188
[debug] #2 0005fbb4 in public SSCANF_OnPlayerDisconnect (playerid=0, reason=2) at D:\ODACARDA\pawno\include\nex-ac.inc:3665
[debug] #3 00038c30 in public Itter_OnPlayerDisconnect (playerid=0, reason=2) at D:\ODACARDA\pawno\include\sscanf2.inc:266
[debug] #4 00037008 in ?? (... <2 arguments>) at D:\ODACARDA\pawno\include\YSI\y_iterate.inc:909
[debug] #5 0002853c in public WC_OnPlayerDisconnect (playerid=0, reason=2) at D:\ODACARDA\pawno\include\YSI\y_hooks/impl.inc:682
[debug] #6 00007484 in public OnPlayerDisconnect (playerid=0, reason=2) at D:\ODACARDA\pawno\include\weapon-config.inc:2185
[debug] #7 native Kick () from samp-server.exe
[debug] #8 003a9a98 in public KonektKick (playerid=0) at D:\ODACARDA\gamemodes\HL.pwn:7912
Slika/video ingame problema(obavezno ako je ingame problem): //
Poslednja Izmena: Jul 17, 2020, 21:57:16 POSLE PODNE od Svabо

Posalji sledece linije i malo ispod njih ako zelis:

HL.pwn:

61811
14188
7912
[Include] > Optidraw
[Include] > Model-Sizes-SQL

[pawn]stock UnistiHackTD(playerid)
{
    KillTimer(Hakovanje_Timer[playerid]);
    F_CancelSelectTextDraw(playerid); Ima_Hack_TD[playerid] = 0; Hakuje[playerid] = -1;
   for(new i = 0; i < 56; i++)
   {
      if(Hack_PTD[playerid] != PlayerText:ITD) //61811
      {
           PlayerTextDrawDestroy(playerid, Hack_PTD[playerid]);
           Hack_PTD[playerid] = PlayerText:ITD;
           Kreirano_TD[playerid] --; Hak_PTD[playerid] --;
       }
      }
      return 1;
}[/pawn]

[pawn]    UnistiHackTD(playerid);
    UnistiHJTD(playerid);
    UnistiWarTD(playerid);[/pawn]

[pawn]CB: KonektKick(playerid)
{
   Kick(playerid);
   return 1;
}[/pawn]

Citat: Fr0z3n poslato Jul 17, 2020, 15:39:33 POSLE PODNE
[pawn]stock UnistiHackTD(playerid)
{
    KillTimer(Hakovanje_Timer[playerid]);
    F_CancelSelectTextDraw(playerid); Ima_Hack_TD[playerid] = 0; Hakuje[playerid] = -1;
   for(new i = 0; i < 56; i++)
   {
      if(Hack_PTD[playerid] != PlayerText:ITD) //61811
      {
           PlayerTextDrawDestroy(playerid, Hack_PTD[playerid]);
           Hack_PTD[playerid] = PlayerText:ITD;
           Kreirano_TD[playerid] --; Hak_PTD[playerid] --;
       }
      }
      return 1;
}[/pawn]

[pawn]    UnistiHackTD(playerid);
    UnistiHJTD(playerid);
    UnistiWarTD(playerid);[/pawn]

[pawn]CB: KonektKick(playerid)
{
   Kick(playerid);
   return 1;
}[/pawn]

for(new i = 0; i < 56; i++)  ---->  for(new i; i < 55; i++)

mozda si slucajno dodao jedno mesto vise, a zapravo je potrebno manje.

Ove provere za invalid textdraw ti uopste nisu potrebne.
Poslednja Izmena: Jul 17, 2020, 15:56:18 POSLE PODNE od algorhitmically
[Include] > Optidraw
[Include] > Model-Sizes-SQL

Bravo care nez ni kako sam promenio to XD