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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2004, 02:13 PM
smogo
Discordant
 
Join Date: Jan 2004
Location: 47
Posts: 339
Default perl quest variables mess

it has to do with the perl quest variables that are set for quests; i don't think it happens in qst format, though there might be similarities.

In short : variables ($text, $name, $charid,...) are set accordingly for an event, but not reset. e.g. you might be processing an EVENT_DEATH, but still get $text pertaining to a previous say to this npc (or event another one), by the same or other player.
This discrepancy is shared by all events (it's perl related), and may or may not be harmful (it IS harmful for default.pl quest, or if you are using global variables)

example :
A says 'hail may name is A' to NPC, then leaves . B comes around, and gives item #1001. $text is 'hail my name is A. B leaves, and C comes around. $text, $itemxxxx still set. C has a global var enabled "killed_brother" to "true" on this NPC. C speaks (overrides $text), and NPC reacts attacking C as the quest was designed for. Then D comes around, having never killed anyone. D says 'Hail', and immediatly gets attacked, because "killed_brother" was still set to true.

the guts :
the embparser stores quests in packages, one for each NPC (qst1234), and one (qstdefault) for quests that don't. When an event is triggered, variables are set in the package. Then an other event, variables are set again. But only the variables that are valid/known in the time of the event are set. Different events - differents variables. Thus some variables keep the values set in event #1.

i can't think of any fix at the moment, just wanted to get a feedback. This is really a pain somewhere imho :evil: , but some might think it's just usable undocumented feature
Reply With Quote
  #2  
Old 04-28-2004, 07:15 PM
smuggler's Avatar
smuggler
Sarnak
 
Join Date: Apr 2004
Location: Okaloosa, FL
Posts: 36
Default hmm

is there no way to have the variables set back to defaults after a duration?

or were you championing induvidual variables for each player char?

*whoosh* most of that went about 19 inches over my head
Reply With Quote
  #3  
Old 04-29-2004, 07:02 AM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

There are two possible solutions that come to mind:

1. Have a list of all the variables that are defined prior to perl call. After the perl call, create a variable (a new perl script) that undefines these variables for the package.
1a. Keep moving variables to getVariable (ala getItemName) functions. Less undefines to do.

2. After a perl call is done, delete the package, and reload it. If I recall correctly, though, there are problems with deleting packages because of possible dependencies, etc. However, I seem to remember a safe_delete call in some perl docs somewhere. Not recommending this.. just another option.
Reply With Quote
  #4  
Old 04-29-2004, 09:53 AM
sandy
Hill Giant
 
Join Date: Oct 2002
Posts: 212
Default

does the qglobal variables work well for you ?
I have big problems with it
__________________
Sandy
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 10:48 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3