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
  #6  
Old 07-18-2007, 01:06 AM
sfisque
Hill Giant
 
Join Date: Oct 2006
Posts: 248
Default

Quote:
Originally Posted by Irreverent View Post
OK, what did I do wrong...if I hand in ANY of the plat amt is casts ALL spells?


sub EVENT_ITEM() {
if ($platinum = 500) {quest::selfcast(3360);}
if ($platinum = 200) {quest::selfcast(2570);}
if ($platinum = 50) {quest::selfcast(1693);}
if ($platinum = 20) {quest::selfcast(174);}

if ($platinum = 400) {quest::selfcast(1710);}
if ($platinum = 300) {quest::selfcast(1729);}
if ($platinum = 60) {quest::selfcast(10);}
if ($platinum = 30) {quest::selfcast(39);}

}
ok. one more time.

in each IF statement, he is ASSIGNING the value to $platinum, not testing for equivalence. in PERL, assignment always evaluates to true, unless the RHS is zero, undef, null, or eof.

SO, every IF statement evaluates to true, and, thus, the buffbott casts everything. there's no need for elsif's. all he needs to do is change "if( $variable = some_value)" to the correct form of "if( $variable == some_value )"

this concludes PERL 101, please take a blue book and exam guide. grades will be posted at the end of the semester.

== sfisque
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 06:52 AM.


 

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