Difference between revisions of "(global)"
Line 47: | Line 47: | ||
[[type]] ''returns type of v as a string''<br/><!--GIDEROSMTD:type(v) returns type of v as a string--> | [[type]] ''returns type of v as a string''<br/><!--GIDEROSMTD:type(v) returns type of v as a string--> | ||
[[unpack]] ''returns all elements from list''<br/><!--GIDEROSMTD:unpack(list) returns all elements from list--> | [[unpack]] ''returns all elements from list''<br/><!--GIDEROSMTD:unpack(list) returns all elements from list--> | ||
+ | [[vector]] ''vector with up to 3 values''<br/><!--GIDEROSMTD:vector(x,y[,z]) vector with up to 3 values--> | ||
[[xpcall]] ''pcall function f with new error handler err''<br/><!--GIDEROSMTD:xpcall(f,err) pcall function f with new error handler err--> | [[xpcall]] ''pcall function f with new error handler err''<br/><!--GIDEROSMTD:xpcall(f,err) pcall function f with new error handler err--> | ||
Latest revision as of 02:39, 8 November 2024
Supported platforms:
Available since: Gideros 2011.6
Description
Global scope of Lua environment.
Example
Prints all current global variables:
local function globalVariable()
for k,v in pairs(_G) do
print(k,v)
end
end
globalVariable()
Methodsassert error if v nil or false, otherwise returns v |
EventsConstants |