Discussion of Inner Space
Moderators: Lavish Software Team, Moderators
-
mynickis1234
- GamingTools Subscriber
- Posts: 4
- Joined: Wed Jul 26, 2006 6:42 pm
Post
by mynickis1234 » Tue Dec 12, 2006 8:36 pm
I think there is a bug with registering events that haven't happened yet. For instance if I start the script below in WorldOfWarcraft then buff myself, I get no event fires. But if I buff myself first then start the script it will know what a UNIT_AURA event is and the event fires. Not sure if this is a lavish script problem or isxwow so I'm posting in both forums.
Code: Select all
function main()
{
call RegisterEvents
do
{
waitframe
}
while TRUE
}
function RegisterEvents()
{
Event[UNIT_AURA]:AttachAtom[UNITAURA]
}
atom(script) UNITAURA(string eventid, string eventstring, string who)
{
echo "UNITAURA: who=${who} eventid=${eventid} eventstring=${eventstring}"
}
-
Lax
- Owner
- Posts: 6634
- Joined: Fri Jun 18, 2004 6:08 pm
Post
by Lax » Wed Dec 13, 2006 4:55 am
Event[name] doesn't actually register the event if it doesnt already exist. What you need to do is register it first with LavishScript:RegisterEvent[name] to guarantee that it exists