[01:05:28] [debug] Run time error 4: "Array index out of bounds" [01:05:28] [debug] Attempted to read/write array element at index 50 in array of size 50 [01:05:28] [debug] AMX backtrace: [01:05:28] [debug] #0 002c4958 in public IniciandoFallout () at C:\Users\User\Desktop\gamemodes\DME.pwn:45320
function IniciandoFallout()
{
SetTimer("TimerFallout", 1000, 0);
for(new i = 0; i <= MAX_PLAYERS; i++)
{
if(Player[i][EmEvento] == 1) //Linha do Erro
{
new Random = random(sizeof(SpawnFallout));
SetPlayerPos(i, SpawnFallout[Random][0], SpawnFallout[Random][1], SpawnFallout[Random][2]);
SendClientMessage(i, COR_CV, "Evento Iniciado! Boa Sorte!");
TogglePlayerControllable(i, 1);
}
}
}
for(new i = 0; i < MAX_PLAYERS; i++)
Mude o cabeзalho do loop para :
Code:
for(new i = 0; i < MAX_PLAYERS; i++) Espero ter ajudado . |