Thread: Variables LAM
View Single Post
02/23/23, 12:32 PM   #2
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 665
The value has to be recognized somewhere and you can't reuse it. Then once Lam sets the value, then change the global set variable you want. The setFunc for Lam can call a function.

What language do you speak?

Code:
local function SetData()
  if addonname.Sets == "Dark Convergence" then
   <Do Stuff>
  elseif addonname.Sets == "Perfected Void Bash" then
   <Do Stuff>
  end
end

-- LAM Menu Code
<SNIP>
[4] = {
    type = "dropdown",
    name = "SETS",
    choices = {"Dark Convergence", "Perfected Void Bash"},
    getFunc = function() return addonname.Sets end,
    setFunc = function(value) 
      addonname.Sets = value 
      SetData()
    end,
},

Last edited by Sharlikran : 02/23/23 at 12:47 PM.
  Reply With Quote