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:
function RollDice()
local num = math.random(1,100)
return num
end
EVENT_MANAGER:RegisterForEvent("LootDice", EVENT_ADD_ON_LOADED, OnAddOnLoaded)
LootDice:SetHandler( "OnMoveStop", function())
local function OnAddOnLoaded(eventCode, LootDice)
if(LootDice == "<<LootDice>>") then
local savedVars = ZO_SavedVars:New(LootDice_SavedVariables, 1)
end
end