Posts: 455
Threads: 83
Joined: Nov 2009
Reputation:
0
Hey guys im having a minor issue.
task SendLexieMSG[240000]()
{
new RandMSG = random(sizeof(LVCNR_LEXIE_Mainchat_Messages));
SendClientMessageToAll(WHITE, LVCNR_LEXIE_Mainchat_Messages[RandMSG]);
return 1;
}
Why is that crashing pawno?
Does anyone have any idea?
Posts: 221
Threads: 0
Joined: Oct 2010
Reputation:
0
I guess that's supposed to be a function, so mainly the 'task' word and this '[240000]' should not be there. You should provide more information anyways, like constant real values.
Posts: 455
Threads: 83
Joined: Nov 2009
Reputation:
0
its this that is causing the error on compiling tho..
new RandMSG = random(sizeof(LVCNR_LEXIE_Mainchat_Messages));
SendClientMessageToAll(WHITE, LVCNR_LEXIE_Mainchat_Messages[RandMSG]);
Posts: 455
Threads: 83
Joined: Nov 2009
Reputation:
0
any other way to pick a random message to echo?
Posts: 2,593
Threads: 34
Joined: Dec 2007
pawn Код:
new LVCNR_LEXIE_Mainchat_Messages[][] =
and problem can be in y_timers.inc
Posts: 455
Threads: 83
Joined: Nov 2009
Reputation:
0
Fixed nevermind, it was the task itself.
forward RandomMessages();
public RandomMessages()
{
new randomMsg = random(sizeof(randomMessages));
SendClientMessageToAll(COLOR_WHITE, randomMessages[randomMsg]);
}
seems to work.