View Single Post
  #1  
Old 10-06-2016, 06:20 PM
Thalix's Avatar
Thalix
Sarnak
 
Join Date: Sep 2016
Posts: 91
Default 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 !
Reply With Quote