Ayuda con este error porfavor
#1

Hola , me preguntaba si alguien podria ayudarme a resolver este error porfavor:

Quote:

[ [debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at index 99 past array upper bound 48
[debug] AMX backtrace:
[debug] #0 0008df24 in crearBarraSalud (npcid=99) at C:\x:7016
[debug] #1 0008bd64 in crearZombie (name[]=@000a3028 "Zombie_0") at C:\x.pwn:6779
[debug] #2 0008bc80 in crearZombies () at C:\x:6764
[debug] #3 00043148 in main () at C:\x.pwn:582
Script[gamemodes/x.amx]: Run time error 4: "Array index out of bounds"

linea 7106:

Код:
stock crearBarraSalud(npcid)
{
	static Float:saludZombie;
	static string[32];
	saludZombie = FCNPC_GetHealth(npcid);
	format(string, sizeof(string), "Zombie\n%.2f\tHP", saludZombie);
	labelZombies[npcid] = Create3DTextLabel(string, -1, 0, 0, 0, 100.0, 0, 1);
	Attach3DTextLabelToPlayer(labelZombies[npcid], npcid, 0, 0, 1.3);
}
Reply
#2

Solucionado, tenia esto : new Text3D:labelZombies[MAX_ZOMBIES]; y era asi : new Text3D:labelZombies[MAX_PLAYERS]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)