View Single Post
  #8  
Old 05-14-2004, 04:53 AM
gandar
Sarnak
 
Join Date: Apr 2004
Location: West Sacramento, CA
Posts: 84
Default

I also thought that the code should have evaluated to false. That's why I was unsure if my suggestion would actually fix it since it was (sorta) working.

= assigns a value
== checks equality
!= not equal

I agree with M0oni9 - by reversing the variable and value, you can easily make sure that it your code is correct because you can never assign a value to a number.
Code:
 $mygold = 100
maybe a typo, but might not be flagged as an error, where
Code:
 100 = $mygold
is both a typo AND an error.

I also agree with Dave987 - always run the Perl script from the command line to check for bugs - easier to spot and fix there.

About your turn in code:
Code:
 if($itemcount{18700} && $itemcount{18700} == 1)
could be changed to
Code:
 if($itemcount{18700} == 1)
When learning to work with the quest system, most of the quests that were already completed use the second example and that's what I've been using while setting up my custom quests.

Anyway, good luck!
~Gandar
Reply With Quote