This part:
Code:
Sub EVENT_TIMER {
if ($timer == DT) {
quest::shout("TEST");
if ($timer == Slow) {
quest::shout("TEST");
if ($timer == Nuke) {
quest::shout("TEST");
}
}
You're original posting was correct..the second one is wrong.
Quote:
[event handler] { // this bracket opens event handler procedure
[condition 1] { // this bracket opens condition 1 procedure
do_work_1;
} // this bracket closes condition 1 procedure
[condition 2] { // this bracket opens condition 2 procedure
do_work_2;
} // this bracket closes condition 2 procedure
} // this bracket closes event handler procedure
|
There could still be other issues, but this is how procedures should be wrapped.
I don't know if perl let's you use single-line conditional statements. If it does, and that's what you're attempting to do,
then the con checks shouldn't have the opening bracket after it.
IF perl does let you, it should look like this. Otherwise you need both open and close brackets around any procedure or
sub-procedure.
Code:
Sub EVENT_TIMER {
if ($timer == DT)
quest::shout("TEST");
if ($timer == Slow)
quest::shout("TEST");
if ($timer == Nuke)
quest::shout("TEST");
}
EDIT: omg..did it really take almost 3 hours to post this?? I'm so dense that I must be warping the very fabric of space-time...