EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   quest::delglobal(); (https://www.eqemulator.org/forums/showthread.php?t=32505)

blackdragonsdg 11-18-2010 06:51 PM

quest::delglobal();
 
Does quest::delglobal(); still work?

All examples of usage I have seen show it being used like this:

quest::delglobal([varname]);

Now if that is true then this should work:

Test.pl
Code:

sub EVENT_SAY {

if($text=~/Hail/)
        {
        quest::setglobal("Hailed_NPC", 1, 5, "F");
        $client->Message(4,"You receive character flag....Hailed_NPC");
        quest::setglobal("Hailed_NPC_2", 1, 5, "F");
        $client->Message(4,"You receive character flag....Hailed_NPC_2");
        $client->Message(4,"If you ask me to [remove these character flags] and I will do so.");
        }
if($text=~/remove these character flags/)
        {
                quest::delglobal("Hailed_NPC");
                $client->Message(4,"The character flag Hailed_NPC has been removed.");
                quest::delglobal("Hailed_NPC_2");
                $client->Message(4,"The character flag Hailed_NPC_2 has been removed.");
        }
}

The problem is that script doesn't completely work...it stops at quest::delglobal("Hailed_NPC");

I have also tried writing it like this quest::delglobal(Hailed_NPC); and quest::delglobal([Hailed_NPC]); but I end up with the same result everytime.

I can comment out the quest::delglobal(); and it will work flawlessly. I can create and mofify qglobals but I can not delete them. I made sure to set the qglobal field for the npc so I know that isn't it.

What I am missing or doing wrong?

steve 11-19-2010 03:02 PM

Did you try a global name that does not have an underscore?

Searching of older posts show that you are using the syntax correctly.

blackdragonsdg 11-19-2010 04:09 PM

Turns out it was the underscores that caused it not to work. That is odd because both setglobal and targlobal work when using underscores. Thanks for the help.


All times are GMT -4. The time now is 07:45 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.