|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |
 |
|
 |

06-02-2011, 12:34 AM
|
 |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by revloc02c
That info Akkadius was very helpful, thanks.
I can't get this to work, here's my plugin:
Code:
sub NewbieBot_say {
my $qglobals = plugin::var('qglobals');
my $client = plugin::val('$client');
$client->Message(315, "TEST 1");
$client->SetGlobal("newbie_charm", 1, 5, "F");
$client->Message(315, "TEST 2");
if ($qglobals->{"newbie_charm"}) {
$client->Message(315, "It exists!");
}
else {
$client->Message(315, "It DOES NOT exists!");
}
my $test = $qglobals->{"newbie_charm"};
$client->Message(315, "$test");
$client->Message(315, "TEST 3");
}
return 1;
And here's the output:
And that's it. Somehow I am not getting it to interpret $qglobals->{"newbie_charm"}; correctly. I checked the database and it is getting in there correctly from line 5. But as soon as I try to access it, nuthin. Can anyone see the problem?
|
From the sounds of it, your Perl script has compilation errors, as in it isn't getting past line 7 to parse the $qglobals object.
Did you source the plugins SVN first? Because it has a line commit global.pl that allows the parsing of $qglobals from within plugins.
|
 |
|
 |

06-08-2011, 09:36 PM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
Thanks for looking at that. It must be my global.pl file, which I know you've mentioned twice, but I am not following you.
What does that mean?
(Sorry, I am not trying to be daft, just kinda new and still learning the lingo.)
I did "SVN Update" with Tortoise on the plugins folder, but that did not help, so you must mean something else.
|

06-08-2011, 09:47 PM
|
 |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by revloc02c
Thanks for looking at that. It must be my global.pl file, which I know you've mentioned twice, but I am not following you.
What does that mean?
(Sorry, I am not trying to be daft, just kinda new and still learning the lingo.)
I did "SVN Update" with Tortoise on the plugins folder, but that did not help, so you must mean something else.
|
Checkout plugins from here:
http://www.eqemulator.org/forums/showthread.php?t=32608
|

06-23-2011, 11:07 AM
|
 |
Hill Giant
|
|
Join Date: Aug 2010
Location: UT
Posts: 215
|
|
I know it takes me a long time to reply, I got a busy RL.
Anyway, I just want to say a thorough thanks. I got it. Akkadius, I really, really appreciate you taking the time to answer my questions.
In case anyone else ever reads the thread here's some more details:
I followed the link in the previous post, and then the two links there. The first link took me to a list of plugins, and I copied the "globals.pl" one. It looks the same as the one I already had, but on closer inspection it is different, and once I replaced it, my code works like a charm--in other words, the $qglobals variable can be accessed from inside a plugin.
As an aside: I found lots of other useful plugins in those links. Gonna take me months to look through it because I am so busy, but it should be fun (that's why we do this right?).
|

06-23-2011, 01:08 PM
|
 |
Administrator
|
|
Join Date: Feb 2009
Location: MN
Posts: 2,072
|
|
Quote:
Originally Posted by revloc02c
I know it takes me a long time to reply, I got a busy RL.
Anyway, I just want to say a thorough thanks. I got it. Akkadius, I really, really appreciate you taking the time to answer my questions.
In case anyone else ever reads the thread here's some more details:
I followed the link in the previous post, and then the two links there. The first link took me to a list of plugins, and I copied the "globals.pl" one. It looks the same as the one I already had, but on closer inspection it is different, and once I replaced it, my code works like a charm--in other words, the $qglobals variable can be accessed from inside a plugin.
As an aside: I found lots of other useful plugins in those links. Gonna take me months to look through it because I am so busy, but it should be fun (that's why we do this right?).
|
Not a problem
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 03:02 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |