The language implemented by LgScript is mostly the same as standard Lua. The differences are:
[
string ]
can appear where the value of the string is the symbol name. A variable
”.__pairs
, __ipairs
, and __len
(Backport from 5.2).@rem
as magic for turning a Lua script into a BAT file.math.mod
, string.gfind
and table.setn
.os.time
.And includes bundled modules for the following features:
fcall
, finalize
, finally
, onreturn
, onerror
.seq
. Returns a sequence of numbers. Takes one, two, or three numeric parameters.shift
and change the behavior of select
. For any list of values A and any integer N, shift(N,A) will return the first N values and select(N+1,A) will return the remaining values.vector
and methods vector.mag
, vector.norm
, vector.dot
, vector.cross
, vector.new
.extend
, merge
, reverse
, pack
, find
, keys
, values
.round
.
When running in the game, the io
and os
libraries are disabled for security.