View Single Post
04/25/14, 11:10 AM   #17
zireko
 
zireko's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 63
Ok I took and cleaned up the code and have it looking nice. Now I'm getting an error. Here is the code so far if you can see where I'm messing up let me know. Please show code back to me since I'm new it helps me out a lot because I'm still learning.

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.     local function OnAddOnLoaded(eventCode, LootDice)
  10.     if(LootDice == "<<LootDice>>") then
  11.         local savedVars = ZO_SavedVars:New(LootDice_SavedVariables, 1)
  12.     end
  13. end
  Reply With Quote