Wiki Help
Home
/
Edit Syntax Highlight: Lua
View
Edit
History
No Category
Editing The Wiki
Custom Tags
Tests
Log in to edit
Syntax Highlight: Lua
<cat>test</cat> <title>Syntax Highlight: Lua</title> ```lua nil false true ... var = "\a\b\f\n\r\t\v\\\"\'" var = 'alo\n123"' var = "alo\n123\"" var = '\97lo\10\04923"' var = [[alo 123"]] var = [==[ alo 123"]==] 3 3.0 3.1416 314.16e-2 0.31416E1 0xff 0x56 var = { [f(1)] = g; "x", "y"; x = 1, f(x), [30] = 23; 45 } 1 + 1 < 1 - 1 <= 1 * 1 > 1 / 1 >= 1 ^ 1 == 1 % 1 ~= 1 .. 1 != (#1 and -1 or not 1) && || and or break not return continue goto Name ::Name:: do block end while exp do block end repeat block until exp if exp then block elseif exp then block else block end for Name = exp, exp, exp do block end for namelist in explist do block end function funcname(parlist, ...) block end function obj:funcname(parlist, ...) self:method() end function tbl.funcname(parlist, ...) block end function tbl.tbl.funcname(parlist, ...) block end function chat.AddText(parlist, ...) block end local function Name(parlist, ...) block end local namelist = explist; funcname(parlist, ...) obj:funcname(parlist, ...) tbl.funcname(parlist, ...) chat.AddText(parlist, ...) tbl.tbl.funcname(parlist, ...) tbl[1]["foo"].bar(...) tbl[foo].foo.bar(...) ply:GetViewModel():GetAttachment( 1 ).Pos -- Single comment code() -- Single comment hell.yeah() --[[Multilined comment ]]-- dude.cool() --[[Multilined comment ]] not_a_comment() /*C style Multilined comment */ global_func() // C style comment hee( global_func ) --[===[ Multilined comment ]===]-- post( ... ) ```
Wiki Help
The Facepunch Wiki
Editing The Wiki
7
Code Blocks
About This Wiki
Bugs And Requests
Headings
Tables
Uploading Images & Files
View Formatting
Custom Tags
19
Ambig
Bug
Cat
Deprecated
Example
Function
Internal
Key
Member
Note
Page
Page List
Removed
Rustitem
Structure
Title
Type
Validate
Warning
Tests
2
Markdown
Syntax Highlight: Lua