you're right, it seems to be crashing in the function
TMA_Menu.RegisterSettings()
Code:
-- Register Settings
function TMA_Menu.RegisterSettings()
--This event is called at EACH realoadui again so do not use that to register datam, use EVENT_ADD_ON_LOADED at best
--EVENT_MANAGER:RegisterForEvent("TMA_Menu", EVENT_PLAYER_ACTIVATED, function()
local dark, scene, leftFragment, rightFragment = TMA_Menu.CreateSettingWindows()
local data = {
id = "TMAMenu",
name = TMA.DisplayName,
longname = TMA.NameS,
callback = function()
SCENE_MANAGER:AddFragment(scene)
SCENE_MANAGER:AddFragment(leftFragment)
SCENE_MANAGER:AddFragment(rightFragment)
end
unselectedCallback = function()
SCENE_MANAGER:RemoveFragment(scene)
SCENE_MANAGER:RemoveFragment(leftFragment)
SCENE_MANAGER:RemoveFragment(rightFragment)
end
}
TMA_Menu:RegisterAddonPanel("TMAMenu", data)
ZO_GameMenu_AddSettingPanel(data)
--end)
end
when I used your method, it let me up to here and the game didn't crash, so it's probably this part of the code
Code:
TMA_Menu:RegisterAddonPanel("TMAMenu", data)
ZO_GameMenu_AddSettingPanel(data)
I just don't know what's wrong with this part