View Single Post
  #3  
Old 10-05-2004, 01:51 PM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

Relocate your if($item ...) block to a new sub, EVENT_ITEM.
Code:
sub EVENT_SAY
{
   if [text x] then do action y
   etc.
}

sub EVENT_ITEM
{
   if [item x] then do action y
   etc.
}
Probably the $item variable is getting pushed to your script when it attempts to run EVENT_ITEM, but since the sub does not exist, there is no effect, other than assigning the variable a value inside the module. Upon the next hail, EVENT_SAY is triggered again, and the $item variable now has the expected value assigned.
Reply With Quote