I'm pretty new at addons and I've come across a slight roadblock.
When I use self.RegisterEvent(ZONE_CHANGED) I get an error that reads:
Interface\Addons\RepWatch\Core.lua:38:Usage: RegisterEvent("eventname"."methodname"): 'metholdname' - method 'ZONE_CHANGED' not found on self.
I have made sure I have the correct Ace3 Library Files, here is a snippet of my program:
Code:
RepWatch = LibStub("AceAddon-3.0"):NewAddon("RepWatch", "AceEvent-3.0", "AceConsole-3.0")
-------------------------------------
function RepWatch:OnInitialize()
-- Called When the Addon is Loaded
-- Register the Database
RepWatch.db = LibStub("AceDB-3.0"):New("RepWatchDB", defaults, "Char")
LibStub("AceConfig-3.0"):RegisterOptionsTable("RepWatch", options)
self.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("RepWatch", "RepWatch")
self:RegisterChatCommand("RepWatch", "ChatCommand")
end
-------------------------------------
-------------------------------------
function RepWatch:OnEnable()
self:RegisterEvent("ZONE_CHANGED")
self:Print("RepWatch Ver. 0.1 Loaded")
self:Print("Type /RepWatch for Options")
end