View Single Post
  #4  
Old 11-17-2012, 01:45 PM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

ok, i've sorted out that declaring any variables outside of a subroutine in a zone's default.pl causes problems. the thing is, i don't understand why. is it a bug? is it an unintended limitation due the way the namespaces are dynamically created by npcs that use the default script? is it working as intended?

the way i found out this is what was causing me issues is that i added the following line to the beginning of the script

Code:
quest::shout(__PACKAGE__);
without any declarations in what i assume would usually be called 'main', i get a handful of messages in the zone like this:

a cave rat shouts 'qst189410'
a cave rat shouts 'qst189408'
a cave rat shouts 'qst189409'


when this occurs, npcs without an explicitly defined quest script respond as they should, using the default script.

as soon as i try to declare a variable outside of any subroutine, i only see a single shout and nothing works properly.

i'm guessing that there is some relatively simple concept i'm just not grasping about the quest interface, but i don't know what it might be. any information would be much appreciated.
Reply With Quote