View Single Post
04/25/14, 09:00 AM   #15
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
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:
  1. function RollDice()
  2.     local num = math.random(1,100)
  3.     return num
  4. end
  5.  
  6. EVENT_MANAGER:RegisterForEvent("LootDice", EVENT_ADD_ON_LOADED, OnAddOnLoaded)
  7.  
  8. LootDice:SetHandler( "OnMoveStop", function()
  9.      -- overwrite default position with the updated position of your addon here
  10. end)
  11.  
  12. local savedVars = ZO_SavedVars:New(savedVariableLootDice, 1, defaults)
  13.  
  14. local defaults =
  15. {
  16.     offsetX = 0,
  17.     offsetY = 0,
  18. }
  Reply With Quote