Lua Differences
From GMod Wiki
Contents |
Garry's Mod Lua Differences
The Lua engine implemented in Garry's Mod has a few syntactic differences from the original version of Lua.
Name | Lua Standard | C-Style |
Multi-Line Comments | --[[ comment ]] | /* comment */
|
Single Line Comments | -- comment | // comment
|
And | and | &&
|
Or | or | ||
|
Not | not | !
|
Not-Equal | ~= | !=
|
Garry's Mod uses a customised implementation of Lua. It is not standard Lua. |
Pros and Cons of C-style Syntax and Lua Syntax
Lua StandardPros
Cons
|
C-StylePros
Cons
|
Summary
Either syntax works fine, it is largely a matter of personal preference.