View Single Post
  #3  
Old 06-02-2011, 12:17 AM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default I can't figure it out

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:
Code:
TEST 1
TEST 2
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?
Reply With Quote