lua variable
snippet in lua

lua make variable global

user4628

varname = varval

lua local

user832

local name = "jojo"
print("Hello, "..name)

lua variable

user9474

-- Private Variable
local name1 = "John"

-- Public Variable
name2 = "Jane"

print(name1)
print(name2)

Lua variable

user1139

-- Variables are global by default:
globalVariable = 10
-- To make a variable local:
local localVariable = 20

lua variables

user1939

-- Nil (no value)
-- Number => Example: 1234567890
-- String => Example: "random text"
-- Function
-- Userdata
-- Boolean (true/fanse)
-- Table
-- Thread