View Single Post
01-10-10, 12:35 PM   #15
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
local function eventHandler(self, event, ...)
end
That closes the function as soon as you start it. You need to put the "end" at the *end* of the function

To be a bit more illustrative, look at what your current code looks like indented:

lua Code:
  1. local function eventHandler(self, event, ...)
  2.     local active = UnitBuff('player', 'Righteous Fury')
  3.     if not hasrf and active then
  4.         hasrf = true
  5.         print('Rigtheous Fury has been activated')
  6.     elseif hasrf and not active then
  7.         hasrf = false
  8.     end

does that make the problem more clear?
  Reply With Quote