Que podria estar mal aquн?
#1

Quote:

[16:32:36] [debug] Run time error 4: "Array index out of bounds"
[16:32:36] [debug] Accessing element at index 6 past array upper bound 5
[16:32:36] [debug] AMX backtrace:
[16:32:36] [debug] #0 0008bc08 in public PoolZombeys () at C:\x.pwn:6795
[16:32:37] [Zombeydere] 3 Zombeys successfully spawned.
[16:32:37] [Zombeydere] 3 Dummy zombies were kicked.
[16:32:37] [connection] incoming connection: 64.110.27.130:49676 id: 0
[16:32:37] [npc:join] [NPC]Hunter has joined the server (0:64.110.27.130)

Linea 6795:

Код:
public PoolZombeys()
{
	new name[MAX_PLAYER_NAME],zombey;
	format(name,sizeof name,"Z%d%d%d",random(10),random(200),random(500));
	zombey = ConnectRNPC(name);
	NPCdere[zombey][dArea] = -1; // 6795
	NPCdere[zombey][dPool] = true;
	if(zombey < DUMMY_QUANT + MAX_ZOMBEY) SetTimer("PoolZombeys",70,false);
	return 1;
}
Reply
#2

El arreglo NPCdere estб obteniendo un valor de la variable zombey que es mayor a el tamaсo dado, es decir, el tamaсo del arreglo es 5 y esta accediendo al 6 el cual no existe.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)