Files
Basalt/docs/docs1_6/objects/Basalt/getVariable.md
Robert Jelic d4c72514ef Docs 1.6
Accidentally uploaded outdated 1.6 docs
2023-05-01 16:28:46 +02:00

496 B

Basalt

getVariable

Returns a variable defined with setVariable

Returns

  1. variable The variable stored

Usage

  • Displays the stored variable in the debug console
basalt.setVariable("abc", function()
  basalt.debug("I got clicked")
  return 1
end)

basalt.debug(basalt.getVariable("abc")()) -- Should debug log "I got clicked" and debug log 1 (which was returned from the function)
<button onClick="abc" text="Click me" />