Hmm, still having issues. I may just be doing something dumb again, but for now I'll just enjoy the rest of the beta and try again later. Once we get closer to release hopefully there'll be more documentation and tutorials.
Lua Code:
local cs = CHAT_SYSTEM
local em = GetEventManager()
local function p(str)
cs:AddMessage(str)
end
local function New()
local addonName = "XPTracker"
OnLoad()
end
local function OnLoad()
em:RegisterForEvent(EVENT_EXPERIENCE_GAIN, function(...) OnXPGain(...) end)
end
local function OnXPGain(...)
local eventCode, value, reason = ...
--print xp to chat
p("printing")
p( "!!!XP Gained: "..value )
end
New()