Run time error 4: "Array index out of bounds"
#1

[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 :
Код:
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;
}
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.
Reply


Messages In This Thread
Run time error 4: "Array index out of bounds" - by Wayn - 01.11.2012, 03:37
Re: Run time error 4: "Array index out of bounds" - by zSuYaNw - 01.11.2012, 03:42
Re: Run time error 4: "Array index out of bounds" - by Wayn - 01.11.2012, 03:48
Re: Run time error 4: "Array index out of bounds" - by zSuYaNw - 01.11.2012, 03:57
Re: Run time error 4: "Array index out of bounds" - by Wayn - 01.11.2012, 04:00

Forum Jump:


Users browsing this thread: 1 Guest(s)