lua function global variable code example
Example 1: lua make variable global
varname = varval
Example 2: Lua variable
-- Variables are global by default:
globalVariable = 10
-- To make a variable local:
local localVariable = 20
varname = varval
-- Variables are global by default:
globalVariable = 10
-- To make a variable local:
local localVariable = 20