[HELP] Debuged command /p array index of bounds
#1

Hello I was finally debuged my gamemode and in server log it says [16:48:23] [debug] Run time error 4: "Array index out of bounds"
[16:48:23] [debug] Accessing element at negative index -1
[16:48:23] [debug] AMX backtrace:

that error is in command /p

at this line : RazgovaraSa[ZoveGa[playerid]] = PozivZa[ZoveGa[playerid]];
Reply
#2

pawn Код:
if (ZoveGa[playerid] != -1) RazgovaraSa[ZoveGa[playerid]] = PozivZa[ZoveGa[playerid]];
Reply
#3

that's the same error is show at this code:

naplatipoziv[RazgovaraSa[playerid]] = SetTimerEx("UzmiZaPoziv",Min(1),true,"d",Razgovara Sa[playerid]);
Reply
#4

Then RazgovaraSa[playerid] is -1 so you should do the same method as above (checking if the variable is not -1 and use it inside the array).

I'm pretty sure those are probably the default values for those variables and it does not set the values as it was supposed to and it will never call the timer as long as RazgovaraSa[playerid] is -1.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)