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? |
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.
|
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.
|
No, delglobal() only deletes the database entry as far as I know.
|
Oh. How do I undefine it? :)
|
I did some perl research and tried this...
undef $qglobals{weiuaFirst}; It still didn't work. :( |
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; |
Okay will try :)
Thanks. |
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. |
All times are GMT -4. The time now is 01:45 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.