View Single Post
  #2  
Old 05-13-2011, 12:25 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Quote:
Originally Posted by revloc02c View Post
So I've been working on plugins and discovered that I can't access $qglobals{variable_name_here} from inside the plugin. Am I correct? Is there a work around?

So I passed $qglobals{variable_name_here} into the plugin to a var just called $qglobals and that was working until I wanted to set/save a value. I found
Code:
quest::setglobal("variable_name_here", 1, 5, "F");
doesn't work. Am I correct? Is there a work around?

Just a couple more points, it was all working fine in a regular .pl file in the "quests" folder (so I got the $qglobal created in the db just fine, and the flag in the "npc_types" table set already too), just when I tried to get it in a plugin where I am running into trouble.
Check out this link where the instances plugin uses qglobals inside a plugin:

http://code.google.com/p/eqemuplugin...k/Instances.pl

In order for this to work you need to make a change to globals.pl, you can source the plugins SVN for the file or check out the whole thing in general. That should help you achieve your goals.
Reply With Quote