18.04.2019, 10:10
My codes:
Problem:
pawn Code:
OnGameModeInit:
SetTimer("SendRandomMessage", 3*60000, true);
RandomMessage_Order = 0;
//------------------------------------
Callback:
forward SendRandomMessage();
public SendRandomMessage()
{
SendClientMessageToAll(0xFAAC58FF, RandomMessage_[RandomMessage_Order]);
RandomMessage_Order++;
if(RandomMessage_Order > sizeof(RandomMessage_))
{
RandomMessage_Order = 0;
}
return 1;
}
pawn Code:
[14:35:55] [debug] Run time error 4: "Array index out of bounds"
[14:35:55] [debug] Attempted to read/write array element at index 16 in array of size 16
[14:35:55] [debug] AMX backtrace:
[14:35:55] [debug] #0 0012af64 in public SendRandomMessage () in GameMode.amx
[14:35:55] [timerfix.plugin] cannot execute callback with name "SendRandomMessage"