Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2010, 03:33 AM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default delquest not working?

Here's sample of my code...

if (plugin::check_handin(\%itemcount, $tinybone => 1)) {
quest::say("You found it! Thanks.");
quest::say("Talk to me when you are ready for next adventure.");
quest::level(4);
quest::delglobal("weiuaFirst");
} else {
plugin::return_items(\%itemcount);
quest::say("I have no use for this item, $name. Take it back.");
}

Now, the problem is that setglobal works, and returns true when defined $qglobals{WeiuaFirst} is checked, but once its defined, it don't seem to change back to false after delglobal is used. That is, unless I use clear quest cache command.

Is there wrong with how I use delglobal?
__________________
Hmm...
Reply With Quote
  #2  
Old 09-03-2010, 05:38 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

That is correct. The delglobal() command does not clear the cache. You need to undefine the variable or (even better) just set the global to 0 if you are going to reuse it.
Reply With Quote
  #3  
Old 09-04-2010, 01:39 AM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

I thought undefine is what delglobal does? Right now I'm just using it as boolean variable - that is, if it exists it's true, otherwise false.
__________________
Hmm...
Reply With Quote
  #4  
Old 09-04-2010, 01:48 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

No, delglobal() only deletes the database entry as far as I know.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 09-04-2010, 01:50 AM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

Oh. How do I undefine it?
__________________
Hmm...
Reply With Quote
  #6  
Old 09-04-2010, 07:52 PM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

I did some perl research and tried this...

undef $qglobals{weiuaFirst};

It still didn't work. :(
__________________
Hmm...
Reply With Quote
  #7  
Old 09-04-2010, 08:05 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

You're better off setting a different value than deleting the global if you want to reuse it.

The proper way would be: $qglobals{weiuaFirst} = undef;
Reply With Quote
  #8  
Old 09-06-2010, 02:12 PM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

Okay will try

Thanks.
__________________
Hmm...
Reply With Quote
  #9  
Old 09-07-2010, 07:53 PM
Hmm
Discordant
 
Join Date: Jan 2002
Posts: 276
Default

Didn't work, but since my quests grant levels, I just used $ulevel to make sure quest can't be repeated.

Zoning seems to actually remove the global variable, but theres no way to clear it up while staying in zone without quest clear cache or just zoning.
__________________
Hmm...
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 06:12 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3