View Single Post
04-06-22, 02:21 PM   #2
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
You don't need to set the OnLoad script, that's only applicable when your frame is defined in XML
Lua Code:
  1. print("HELLOOOOOOOO") -- This prints
  2.  
  3. local OnEvent = function(self, event, ...)
  4.     print(event)
  5. end
  6.  
  7. local AddonParent = CreateFrame("Frame")
  8. AddonParent:SetScript("OnEvent", OnEvent)
  9. AddonParent:RegisterEvent("PLAYER_LOGIN")
  10. AddonParent:RegisterEvent("PLAYER_ENTERING_WORLD")
  11. AddonParent:RegisterEvent("ARENA_OPPONENT_UPDATE")

Last edited by Ketho : 04-06-22 at 03:38 PM.
  Reply With Quote