I try with the one line, and I get this error:
Code:
user:/AddOns/LoneStarTweaks.lua:11 ) expected (to close ( at line 5) near 'end'
I tried to figure it out myself... Added the ) on line 11, but then it wanted the , removed as well. And then when I removed the , it wanted even more things changed! AAAHHHH! lol
Edit:
For now, I'm just going to use:
Code:
local function LoneStarTweaks_Loaded(eventId, addOnName)
if addOnName ~= "LoneStarTweaks" then return end
EVENT_MANAGER:UnregisterForEvent("LoneStarTweaks_Event_Add_On_Loaded", EVENT_ADD_ON_LOADED)
EVENT_MANAGER:RegisterForEvent("LoneStarTweaks_Event_Player_Activated", EVENT_PLAYER_ACTIVATED,
function(eventIdPA, wasFirst)
--wasFirst is true if it was the first event call, should be after login
local zoneName = ZO_CachedStrFormat("<<C:1>>", GetZoneNameByIndex(GetCurrentMapZoneIndex()))
if wasFirst then
d("=================\nZone Changed To: " ..zoneName)
else
d("=================\nZone Changed To: " ..zoneName)
end
end)
end
EVENT_MANAGER:RegisterForEvent("LoneStarTweaks_Event_Add_On_Loaded", EVENT_ADD_ON_LOADED, LoneStarTweaks_Loaded)
I don't need a different notification for logging in versus changing zones. I just need a note in chat to remind me that I've changed zones and can no longer respond to the same zone chat.
Because I'm ADD and forgetful. LOL