Accessing element at index & Run time Error

Započeo Vasic, Mart 01, 2019, 14:25:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Ovako, ubacio sam neku mapu od WinWina u UP mod cisto da testiram, uzeo sam koordinate ulaza i izlaza, dodao u skriptu i bez errora kompajlovalo. Onda udjem u gejm, odem do win win, i kada udjem, ladno propadam kroz mapu ali ucitana je mapa, znaci prvo mi se spawnuje u mapu (sve normalno nakon 5 sec) i onda propadnem. Stavio sam i freeze time na 5 sec kada ulazi. Ja sam to hteo resiti jer znam, ali kada sam pogledao server log, ovo mi se pojavilo: [pawn][14:14:04] [debug] Run time error 4: "Array index out of bounds"
[14:14:04] [debug]  Accessing element at index 65535 past array upper bound 149
[14:14:04] [debug] AMX backtrace:
[14:14:04] [debug] #0 002bd40c in IgracPolicajac (playerid=65535) at C:\modovi\Old Nation - by Vasic\gamemodes\onation.pwn:27920
[14:14:04] [debug] #1 001dd2c0 in ?? (... <4 arguments>) at C:\modovi\Old Nation - by Vasic\gamemodes\onation.pwn:16118
[14:14:04] [debug] #2 0000d294 in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=4.95000, weaponid=54, bodypart=3) at C:\modovi\Old Nation - by Vasic\pawno\include\YSI\y_hooks/impl.inc:2362[/pawn] ali od tim publicima je sve norm.. Bar sam ja tako video... Evo vam i njih:
[pawn]stock IgracPolicajac(playerid)
{
   if(PlayerInfo[playerid][pClan] == 1)
   {
      return 1;
   }
   else if(PlayerInfo[playerid][pLider] == 1)
   {
      return 1;
   }
   return 0;
}
//drugo
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
   if(IgracPolicajac(issuerid))
   {
      if(GetPlayerWeapon(issuerid) == 23)
      {
         new string[512];
         if(PlayerInfo[playerid][pTrazeniLevel] == 0) return SCM(issuerid,-1,""PLAVA"(( ON:RP )) - "SIVA"Igrac nema Wanted Level!");
         if(IgracPolicajac(playerid)) return SCM(issuerid,-1,""PLAVA"(( ON:RP )) - "SIVA"Ne mozes tazovati PD!");
         if(PlayerInfo[issuerid][pRank] == 0) return SCM(issuerid,-1,""PLAVA"(( ON:RP )) - "SIVA"Suspendovan si!");
         if(AdminDuty[playerid] == 1) return SCM(issuerid,-1,""PLAVA"(( ON:RP )) - "SIVA"Taj igrac je Admin na duznosti!");
         format(string, sizeof(string), "%s puca tazerom na %s-a i pogadja ga.", GetName(issuerid) ,GetName(playerid));
         ProxDetector(20.0, issuerid, string, PROX,PROX,PROX,PROX,PROX);
         TogglePlayerControllable(playerid, 0); IgracTazovan[playerid] = 1;
         TazerTimer[playerid] = SetTimerEx("TazovanTajmer", 15000, false, "i", playerid);
         OnePlayAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
      }
   }
   return 1;
}[/pawn]Dakle u cemu je problem?

Dio skripte: [ pawn ]-.-[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]sve je gore[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): //
Poslednja Izmena: Mart 02, 2019, 00:35:21 PRE PODNE od Bašovski
• Website: www.vasic.dev
Web Development & Cyber Security

Da il imas kakaw Warning/Error kad kompajlas skriptu ? Da li imas drugu mapu neku , da testiras , moguce da je mapa losa  :D




Give Honor To The One Who Deserve It





Problem FIXAN! Bio je problem oko freeze, nisam dobro namestio Toggleplayercontrollable, sad sam resio. :D
• Website: www.vasic.dev
Web Development & Cyber Security

Citat: Vasic poslato Mart 01, 2019, 15:06:54 POSLE PODNE
Problem FIXAN! Bio je problem oko freeze, nisam dobro namestio Toggleplayercontrollable, sad sam resio. :D


GL u radu  8)




Give Honor To The One Who Deserve It