01.11.2012, 03:37
[21:16:59] [debug] Run time error 4: "Array index out of bounds"
[21:16:59] [debug] Accessing element at index 50 past array upper bound 49
[21:16:59] [debug] AMX backtrace:
[21:16:59] [debug] #0 0016e09c in ?? () from gamemode.amx
[21:16:59] [debug] #1 00009d50 in public NewsFlash () from gamemode.amx
my public function :
Help me please.it works fine untill the night comes in,the server gets empty, and in the morning,the server,crashed.and i have to restart it daily.
[21:16:59] [debug] Accessing element at index 50 past array upper bound 49
[21:16:59] [debug] AMX backtrace:
[21:16:59] [debug] #0 0016e09c in ?? () from gamemode.amx
[21:16:59] [debug] #1 00009d50 in public NewsFlash () from gamemode.amx
my public function :
Код:
public NewsFlash() { for(new i = 0; i <= MAX_PLAYERS; i++) { new message1 = random(sizeof(NewsDE)); new message2 = random(sizeof(NewsEN)); if(GetPlayerLanguage(i)== LANG_DE) { SendClientMessage(i,NEWSFARBE,NewsDE[message1]); } else { SendClientMessage(i,NEWSFARBE,NewsEN[message2]); } } return true; }