Still very new to lua so its probably all me lol
I am having some issues dealing with ZO_SavedVars. for example, I constantly receive a stack traceback error on the line for event manager. I believe I have a issue with how I am recalling the values from ZO_SavedVars.
So far google has not been friendly to me with this project. I have a tough time telling the lua code apart from apy function events and w/e else there is in code samples I'm referencing from multiple addons. Any help/tips is apreciated
Lua Code:
-- Default Saved Variables
MMO.defaults = {
-- Bag
OverideBag = true,
-- Map
OverideMap = true,
-- ActionBar
OverideActionBar = true,
-- Mouse
OverideMouse = true
}
-- Hook initialization onto the EVENT_ADD_ON_LOADED listener
EVENT_MANAGER:RegisterForEvent( "MMO" , EVENT_ADD_ON_LOADED , MMO.Initialize )
function MMO.Initialize( )
-- Register the slash command handler
SLASH_COMMANDS[MMO.command] = MMO.Slash
-- Load saved variables
MMO.Vars = ZO_SavedVars:New( 'MMO_VARS' , math.floor( MMO.version * 100 ) , nil , MMO.defaults )
if (MMO.Vars.OverideBag == true) then
MMO.bag()
end
if (MMO.Vars.OverideActionBar == true) then
MMO.actionbar()
end
end