dd8d2659753c76753438fc264260a20677ccc807
function f = cmd(a,b;c,d) is equivalent to function f = function(self, ...) self:a(b); self:c(d); end This is equivalent to LuaHelpers::ParseCommandList, except: - Commands are not lowercased. Do that yourself. - The "parent" parameter is not included. Use self:GetParent(). - "+5" is not valid. The benefits are: - Better syntax checking. Running "luac" on the Lua files will do syntax checking, and runtime syntax checks will find problems earlier. - Easier optimization. Lua files can be compiled, and when using commands this way, commands will be precompiled, too. - Commands are compiled in the same scope, so upvalues work: local foo = 10; y = cmd(x,foo);
Languages
C++
85.7%
Lua
4.3%
C
4.3%
Rich Text Format
2.3%
CMake
1.1%
Other
2%