Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2004, 10:17 AM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default plugin success / failure

I'm having difficulties with plugins.
Zone seems to load them from the plugins/*.pl sometimes, sometimes not.
Also, loading chokes one some script errors, not on others.

Anyone post information about status, thanks in advance.
Reply With Quote
  #2  
Old 02-28-2004, 01:41 PM
samandhi's Avatar
samandhi
Demi-God
 
Join Date: Aug 2003
Posts: 1,056
Default

Quote:
Zone seems to load them from the plugins/*.pl sometimes, sometimes not.
Is it random which ones do and which ones dont? Or is it constant which ones dont?
__________________

Quote:
Analysis paralysis will keep you from failing, but it will also keep you from succeeding.
  • L.L. CoolJ
Reply With Quote
  #3  
Old 02-28-2004, 01:51 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

it's still hard to say. Pretty random anyway.

./plugin.pl always gets loaded fine.

./plugin/*.pl, well, sometimes all succed, sometimes a group, but generally at least one ot two always get loaded. Still i can't guess the rule.

I suspect there is an error in one script (at least something the embparser does not like), and after that, it loads no more. It might be the readdir function used to parse directory that makes it random, that retrieves filenames one at a time. Duno if it's sorted on name, modification time, creation time, ...
Reply With Quote
  #4  
Old 02-29-2004, 10:15 AM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default

got it !

the file loading uses cache, to check if a package (read 'npc quest') was already loaded. It does the same for plugin files. So, it doesn't load the file if it is older than the previously loaded plugin file.

Correcting this in the embperl.cpp file :
Code:
@@ -93,7 +94,7 @@
                        "my($package, $filename) = @_;"
                        "$filename=~s/\'//g;"
                        "my $mtime = -M $filename;"
-                       "if(defined $Cache{$package}{mtime}&&$Cache{$package}{mtime} <= $mtime){ return; }"
+                       "if(defined $Cache{$package}{mtime}&&$Cache{$package}{mtime} <= $mtime && !($package eq 'plugin')){ return; }"
                        "else {"
                                "local *FH;open FH, $filename or die \"open '$filename' $!\";"
                                "local($/) = undef;my $sub = <FH>;close FH;"
Reply With Quote
  #5  
Old 03-01-2004, 01:30 AM
samandhi's Avatar
samandhi
Demi-God
 
Join Date: Aug 2003
Posts: 1,056
Default

AAAHHH, good eye...
__________________

Quote:
Analysis paralysis will keep you from failing, but it will also keep you from succeeding.
  • L.L. CoolJ
Reply With Quote
Reply


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 02:46 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