Category:Standard Library
Jump to navigation
Jump to search
( This has been taken from a WoWWiki page - See the full, official documentation here )
- _G - Global Variable - A global variable (not a function) that holds the global environment (that is, _G._G = _G). Lua itself does not use this variable; changing its value does not affect any environment, nor vice-versa. (Use setfenv to change environments.) - taken from Lua docs
- assert(value[, errormsg]) - asserts a value evaluates to true. If it is, returns value, otherwise causes a Lua error to be thrown.
- getfenv(function or integer) - Returns the table representing the stack frame of the given function or stack level.
- getmetatable(obj, mtable) - Returns the metatable of the given table or userdata object.
- next(table, index) - Returns the next key, value pair of the table, allowing you to walk over the table.
- newproxy(boolean or proxy) - Creates a userdata with a sharable metatable.
- print - print (ยทยทยท) - Receives any number of arguments, and prints their values to stdout, using the tostring function to convert them to strings. print is not intended for formatted output, but only as a quick way to show a value, typically for debugging. For formatted output, use string.format. - taken from Lua Docs
- select(index, list) - Returns the number of items in list or the value of the item in list at index.
- setfenv(function or integer, table) - Sets the table representing the stack frame of the given function or stack level.
- setmetatable(obj, mtable) - Sets the metatable of the given table or userdata object.
- tostring - tostring (e) - Receives an argument of any type and converts it to a string in a reasonable format. For complete control of how numbers are converted, use string.format. If the metatable of e has a "__tostring" field, then tostring calls the corresponding value with e as argument, and uses the result of the call as its result. - taken from Lua Docs.
- type(var) - Returns the type of variable as a string, "number", "string", "table", "function" or "userdata".
- unpack(table[, start][, end]) - Returns the contents of its argument as separate values.
- xpcall(func, err) - Returns a boolean indicating successful execution of func and calls err on failure, additionally returning func's or err's results.
This category currently contains no pages or media.