Crashdetect (debug)
#1

Код:
[12:17:20] [debug] Run time error 4: "Array index out of bounds"
[12:17:20] [debug]  Accessing element at index 29 past array upper bound 24
[12:17:20] [debug] AMX backtrace:
[12:17:20] [debug] #0 000be9e4 in ?? (... <3 arguments>) at G:\ZS\gamemodes\gamemodes\bttdmzmapocalypse.pwn:8943
[12:17:20] [debug] #1 0000f5e0 in public OnPlayerDeath (playerid=29, killerid=20, reason=25) at G:\ZS\pawno\include\YSI\y_hooks/impl.inc:753
[12:17:20] [debug] [12:17:38] [debug] Run time error 4: "Array index out of bounds"
[12:17:38] [debug]  Accessing element at index 25 past array upper bound 24
[12:17:38] [debug] AMX backtrace:
[12:17:38] [debug] #0 000be9e4 in ?? (... <3 arguments>) at G:\ZS\gamemodes\gamemodes\bttdmzmapocalypse.pwn:8943
[12:17:38] [debug] #1 0000f5e0 in public OnPlayerDeath (playerid=25, killerid=65535, reason=54) at G:\ZS\pawno\include\YSI\y_hooks/impl.inc:753
I'm using YSI 3.1 and seems like its coming from impl.inc ? what could be it ?
Reply
#2

Post line 8943 from bttdmzmapocalypse.pwn and 5 lines before and after. From what I see in the logs, there's an array with size of 25 and you use "playerid" as index. Finding the array and changing its value to MAX_PLAYERS would probably solve it.
Reply
#3

-solved-
Reply
#4

And how is "DeathSpam" defined? It should be:
pawn Код:
new DeathSpam[MAX_PLAYERS];
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
And how is "DeathSpam" defined? It should be:
pawn Код:
new DeathSpam[MAX_PLAYERS];
It was
Код:
new DeathSpam[MAX_PLAYERS char];
new LastDeath[MAX_PLAYERS];
Reply
#6

Quote:
Originally Posted by Penguin1997
Посмотреть сообщение
It was
Код:
new DeathSpam[MAX_PLAYERS char];
new LastDeath[MAX_PLAYERS];
he meant it should be
PHP код:
new DeathSpam[MAX_PLAYERS]; 
char word is bugging it....
Reply
#7

If you want to use packed-arrays, then you should use {index} instead of [index] such as:
pawn Код:
default: DeathSpam{playerid} = 0;
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
And how is "DeathSpam" defined? It should be:
pawn Код:
new DeathSpam[MAX_PLAYERS];
Right I will test it with it and will come with results in few mins.
Reply
#9

Thanks, seems like that was the only problem causing it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)