string.gfind
was renamed string.gmatch (s, pattern)
. (See compile-time option LUA_COMPAT_GFIND
in luaconf.h
.)
string.gsub (s, pattern, repl [, n])
is called with a function as its third argument, whenever this function returns nil or false the replacement string is the whole match, instead of the empty string.
table.setn
was deprecated. Function table.getn
corresponds to the new length operator (#
); use the operator instead of the function. (See compile-time option LUA_COMPAT_GETN
in luaconf.h
.)
loadlib
was renamed package.loadlib (libname, funcname)
. (See compile-time option LUA_COMPAT_LOADLIB
in luaconf.h
.)
math.mod
was renamed math.fmod (x, y)
. (See compile-time option LUA_COMPAT_MOD
in luaconf.h
.)
table.foreach
and table.foreachi
are deprecated. You can use a for loop with pairs
or ipairs
instead.
require (modname)
due to the new module system. However, the new behavior is mostly compatible with the old, but require
gets the path from package.path
instead of from LUA_PATH
.
collectgarbage (opt [, arg])
has different arguments. Function gcinfo
is deprecated; use collectgarbage("count")
instead.