Jump to content

[REZOLVAT] Probleme bounds


NoManPv
 Share

Recommended Posts

salut in server log imi arata asta 

 

 

[11:23:22] [debug] Run time error 4: "Array index out of bounds"
[11:23:22] [debug]  Accessing element at negative index -1
[11:23:22] [debug] AMX backtrace:
[11:23:22] [debug] #0 003a625c in public Timers () at C:\Users\NoManPv\Desktop\gun-time\gamemodes\beta.pwn:32777
 
si linia este asta unde se face aici bounds
 
if(PaintType != 0 && PlayersOnPaint(PaintType-1) >= 2) {
new pp = PaintType-1;
if(pp < 2) {
format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Best player: %s (kills: %d)~n~%d players in paintball.",
CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills, PDeaths, PKills-PDeaths, GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
}
else {
new masadenume[32];
GetWeaponNameEx(GetPlayerWeapon(i), masadenume, sizeof(masadenume));
 
format(string, sizeof(string), "Paintball time: %s~n~Current map: %s~n~Stats: %d kills, %d deaths.~n~Total score: %d~n~Level %d, Weapon: %s~n~Best player: %s (kills: %d)~n~%d players in paintball.",
CalculeazaTimp2(PaintTime[pp]), MapName(pp), PKills, PDeaths, PKills-PDeaths, GetPaintLevel(i), masadenume, GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]], PlayersOnPaint(pp));
}
 
if(PaintTime[pp] == 0 && PaintballWinner[pp] != -1) {
for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(i, 1001, 1001, 200);
format(string, sizeof(string), "Statistica ta in aceasta runda: %d ucideri si %d decese.", PKills, PDeaths);
SCM(i, COLOR_YELLOW, string);
format(swinner, 256, "* %s a castigat runda cu %d ucideri.", GetName(PaintballWinner[pp]), PKills[PaintballWinner[pp]]);
PKills = 0, PDeaths = 0;
ResetWeapons(i);
PaintballWinnerScore[pp] = 0;
SendPaintMessage(PaintType, COLOR_YELLOW, swinner);
PaintballWinner[pp] = -1;
}
if(PaintTime[pp] != 0 && PaintText[pp] == 0) {
PlayerTextDrawSetString(i, PaintTD, string);
PlayerTextDrawShow(i, PaintTD);
}
else {
PlayerTextDrawHide(i, PaintTD);
}
}
else PlayerTextDrawHide(i, PaintTD);

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...