Sets a global variable to a specified value. Allows setting the value of a global variable in contexts where its name might be overridden by that of a local variable; i.e. setglobal(name, value) is equivalent to = value or _G["name"] = value.

See also Utility functions.


setglobal("name", value)


  • name - Name of a global variable (string)
  • value - New value for the variable (value)
This function is defined by the default user interface in Lua. You can find the definition by examining the FrameXML code for the default UI,