Thread: Variables LAM
View Single Post
02/23/23, 01:07 PM   #4
zHeMaa
Join Date: Feb 2023
Posts: 3
Originally Posted by Sharlikran View Post
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,
},
I tried the code that you gave me, and it gives me an error on the line (setFunc = function(value)), it must fail some nonsense...

(function expected instead of nil stack traceback)

And I speak Spanish, thank you!
  Reply With Quote