Difference between revisions of "(global)"
(select function added) |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 9: | Line 9: | ||
=== Example === | === Example === | ||
'''Prints all current global variables:''' | '''Prints all current global variables:''' | ||
− | < | + | <syntaxhighlight lang="lua"> |
local function globalVariable() | local function globalVariable() | ||
for k,v in pairs(_G) do | for k,v in pairs(_G) do |
Revision as of 16:51, 12 July 2023
Supported platforms:
Available since: Gideros 2011.6
Description
Global scope of Lua environment.
Example
Prints all current global variables: <syntaxhighlight lang="lua"> local function globalVariable() for k,v in pairs(_G) do print(k,v) end end
globalVariable() </source>
Methodsassert error if v nil or false, otherwise returns v |
EventsConstants |