K I just got into the game and I know something is wrong I flipped the script around and that made my addon work again but it still doesn't save it and I get an error. Here is what the script I have looks like now.
Lua Code:
function RollDice()
local num = math.random(1,100)
return num
end
EVENT_MANAGER:RegisterForEvent("LootDice", EVENT_ADD_ON_LOADED, OnAddOnLoaded)
LootDice:SetHandler( "OnMoveStop", function()
-- overwrite default position with the updated position of your addon here
end)
local savedVars = ZO_SavedVars:New(savedVariableLootDice, 1, defaults)
local defaults =
{
offsetX = 0,
offsetY = 0,
}