Code: Select all
pstats = matches[4]
eqbal = matches[5]
-- Check if time to raise onEqbal --
if eqbalcheck == 1 then
if eqbal == "eb" then
if armb == "lr" then
raiseEvent( "onEqbal" )
echo( " event was just raised" )
eqbalcheck = 0
end
end
end
From that, I assume the event is being successfully raised.
I don't know how to create a script that runs when that event is raised, though.
I click on 'scripts'
I click on 'Add'
I name it something
I put "onEqbal" into the 'Add user defined event handler' field.
I put:
echo( "You have all balance and are ready to go" )
into the script field.
The echo never gets displayed. After rereading the entry on raiseEvent in the Lua API section of the manual, I renamed the script to 'onEqbal', deleted the contents of the 'user defined event handler' field, and put the following into the scripts field:
Code: Select all
function onEqbal( onEqbal )
echo( "You have eq and bal and armb - go go go!" )
end
Please help...