Engine

The Engine provides three global logging helpers available in every Lua script. Each of them targets a different part of the UI and is intended for a different use-case.


log(message: string)

Send a standard UI log message (top-left overlay).

Syntax

log("message")

Description

Adds a styled notification log to the engine’s top-left UI log feed. These logs appear with the same formatting as other engine notifications (fade-out timers, colors, etc.).

Examples

log("Script initialized.")
log("Speed boost activated!")

Overlay Output

[LUA] Script initialized.
[LUA] Speed boost activated!

log_error(message: string)

Send an error message to the UI log panel.

Syntax

Description

Same as log(), but marked as an error, shown with an error style, prefixing the message with [LUA][ERR].

Examples

Overlay Output


log_console(message: string)

Append text to the debug console (persistent until cleared).

Syntax

Description

Writes text directly into the script debugging console, where messages accumulate continuously. This console is separate from the UI log panel and is intended purely for development and live debugging.

Unlike log() and log_error(), console output does not fade or disappear — it continues to append until the user manually clears the console.

Examples

Console Output


log_console_error(message: string)

Append an error message to the debug console (persistent until cleared).

Syntax

Description

Writes an error-styled message directly into the script debugging console. This behaves the same as log_console(), but marks the message as an error and prefixes it with [LUA][ERR].

Unlike log() and log_error(), console error output:

  • Does not appear in the UI overlay

  • Does not fade or disappear

  • Accumulates continuously until the user clears the console

Use this for:

  • Debugging failures inside loops

  • Tracing error conditions without spamming the UI

  • Logging internal script errors or invalid states

  • Development-only error output

Parameters

  • message (string) The error message to append to the debug console.

Examples

Console Output


get_user_name(): string

Returns the current PCX username.

Syntax

Last updated