Appearance
game.log
Native global — no require.
console
function · console(line: string, r?: integer, g?: integer, b?: integer)
Append a script-log line; optional RGB.
Parameters
| Name | Type | Summary |
|---|---|---|
line | string | — |
r | integer | — |
g | integer | — |
b | integer | — |
file
function · file(name: string, line: string, max_bytes?: integer, max_files?: integer): boolean, ErrorMessage?
Append a line to a named script log file.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
line | string | — |
max_bytes | integer | — |
max_files | integer | — |
Returns
| Type | Summary |
|---|---|
boolean, ErrorMessage? | — |
path
function · path(name: string): string
Absolute path of a script log file.
Parameters
| Name | Type | Summary |
|---|---|---|
name | string | — |
Returns
| Type | Summary |
|---|---|
string | — |
now
function · now(): string
Local wall-clock timestamp.
Returns
| Type | Summary |
|---|---|
string | — |
now_ms
function · now_ms(): integer
Steady-clock milliseconds.
Returns
| Type | Summary |
|---|---|
integer | — |