regular expression/comments issues 
		
		
		i just ran into a really weird problem that i can't seem to sort out and i was wondering if someone could take a look at it and tell me if i'm doing something obviously wrong. 
	the following script works as expected. all of the patterns that i have stored as scalars are matching correctly. Code: 
	use strict;(for some reason an extra newline is printed after the final $npc in @spider_list) Code: 
	C:\EQEmu\sandbox>perl test_matches.pli'm at a loss here... any ideas?  | 
		
 found the newline issue... duh. 
	the problem with the comments still exists, however.  | 
		
 it's got to be an issue with the definition of the arrays or iterating over the elements, but i don't completely follow why it would be problematic. the following script gets to the end of the file and prints PASSED (even with the original regexp patterns): 
	Code: 
	use strict; | 
		
 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__);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.  | 
		
 using a work-around of declaring global variables using keyword 'our' instead of 'my' from within EVENT_SPAWN seems to work, but i'm still confused as to why declaring outside of a subroutine would break the script. 
	 | 
		
 Code: 
	sub EVENT_ITEM { | 
		
 Quote: 
	
 please explain why i'd need to use plugin::check_handin() if i'd want every npc that uses default.pl to return the every item they were given, unless they were a pet. when you're done with that exercise in futility, you can try to explain what your suggestion has to do with anything in this thread.  | 
| All times are GMT -4. The time now is 03:52 AM. | 
	Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.