Globals
ℹ️
Page is being worked on.
Globals are available in every module. The listed globals are modified by the Zune backend, refer to the luau globals for the rest of the globals.
Variables
Functions
Variables
_VERSION
_VERSION: string
The version of the Luau runtime. In Zune, this should idealy be
Zune <zune version>+<luau version>
Zune <major>.<minor>.<patch>+<major>.<minor>
Example: Zune 0.1.0+0.640
The following code example shows how to detect if zune is running and provide the Zune version with the Luau version.
detect_zune.lua
local pattern = "(Zune) (%d+%.%d+%.%d+)+(%d+%.%d+)"
local isZune, zuneVersion, luauVersion = string.match(_VERSION, pattern)
if (isZune) then
print(`Zune Version: {zuneVersion}`)
print(`Luau Version: {luauVersion}`)
end
_FILE
_FILE: string
The path of the file that is currently being executed, as an Absolute
path.
This variable may not be available in all cases, such as executing luau in a custom environment.
Functions
print(...any): ()
Parameters
...any
- Values to print.- A table will be transformed into readable string, this is recursive.
require
require(path: string): any
️⚠️
Can Error
Parameters
path: string
- The path to the module to require.- The path can be either an absolute path or a relative path.
- If the path starts with
@
, zune will look for the internal libraries.
Returns
any
Throws
- If the module is not found, an error will be thrown.
- If the module throws an error, the error will be thrown.
- If out of memory, an error will be thrown.
warn
warn(...any): ()
Parameters
...any
- Values to print.- A table will be transformed into readable string, this is recursive.
Last updated on