Here is my zone/player.pl
Quote:
sub EVENT_ENTERZONE
{
if(plugin::check_hasitem($client, 13732))
{
$client->SetPVP(1);
quest::settimer("aggro",20);
$client->Message(257, "A mysterious voice whispers to you, 'I'm coming for you!' ");
}
}
sub EVENT_TIMER
{
if($timername eq "aggro")
{
my $guard_one = $entity_list->GetMobByNpcTypeID(999243);
if ($guard_one)
{
my $hate_guard_one = $guard_one->CastToNPC();
$hate_guard_one->AddToHateList($client, 1);
}
quest::stoptimer("aggro");
}
}
|
Each time I enter this zone, everything is white and the aggro function does not work. When I look at the log, it gives me this line (several instances of it):
Quote:
[08.28. - 20:02:38] Use of uninitialized value in string eq at quests/eastkarana/player.pl line 14.
|
When I change the eq operator to == , the aggro function works, but everything is still white. When I look at the log, it gives me this line:
Quote:
[08.28. - 18:17:46] Argument "aggro" isn't numeric in numeric eq (==) at quests/eastkarana/player.pl line 14.
[08.28. - 18:17:46] Use of uninitialized value in numeric eq (==) at quests/eastkarana/player.pl line 14.
|
I can't seem to win for losing on this. Which is it, and why does the "right" one still give me an error in the log? And why is everything white?