Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #21  
Old 08-13-2012, 10:45 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

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...
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:28 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3