EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Problem with quest::setglobal and defined $qglobals (https://www.eqemulator.org/forums/showthread.php?t=40947)

Thalix 10-06-2016 06:20 PM

Problem with quest::setglobal and defined $qglobals
 
I really don't understand why this is not working. I use it in quests/zone/player.pl

Code:

sub EVENT_ENTERZONE {

  quest::setglobal("TESTING",1,1,"F");
  if (defined $qglobals{TESTING}) {
    $client->Message(15,"Got it!");
  }
  else {
    $client->Message(15,"Something is wrong.");
  }

  quest::setglobal("GLOBALTESTING",1,7,"F");
  if (defined $qglobals{"GLOBALTESTING"}) {
    $client->Message(15,"Got it (globaltest)!");
  }
  else {
    $client->Message(15,"Something is wrong (globaltest).");
  }


}

Output:
Something is wrong.
Something is wrong (globaltest).

Output #globalview:
TESTING 1
GLOBALTESTING 1


That is the reason why the Nexus Scion Quests not working. The globals are set, but they use "defined ... && ..." and defined is always false.

I read http://wiki.eqemulator.org/p?How_To_Use_Quest_Globals but still there is the thing with defined always return false if globals set over quest::setglobal !


All times are GMT -4. The time now is 01:27 AM.

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