Skip to content

ax.util

Source: gamemode/framework/util/util_print.lua

Utility helpers used across the Parallax framework (printing, file handling, text utilities, etc.).

Section: print_utilities

Documented functions: 6

Functions


ax.util:PreparePackage(...)

Utility helpers used across the Parallax framework (printing, file handling, text utilities, etc.). Printing and logging helpers. Prepares a package of arguments for printing (converts entities to readable values).

Parameters

Name Type Description
... any Any values to prepare for printing

Returns

  • table: A table of values suitable for MsgC/Error printing

Usage

local pkg = ax.util:PreparePackage("example", someEntity)

ax.util:Print(...)

Print a regular message with framework styling.

Parameters

Name Type Description
... any Values to print (strings, entities, etc.)

Returns

  • table: The prepared arguments that were printed

Usage

ax.util:Print("Server started")

ax.util:PrintDebug(...)

Print a debug message

Parameters

Name Type Description
... any Values to print for debugging

Returns

  • table|nil: The prepared arguments when printed, nil otherwise

Usage

ax.util:PrintDebug("Loaded module", moduleName)

ax.util:PrintError(...)

Print an error message (Uses ErrorNoHaltWithStack).

Parameters

Name Type Description
... any Values to print as an error

Returns

  • table: The prepared arguments that were printed

Usage

ax.util:PrintError("Failed to load module", moduleName)

ax.util:PrintSuccess(...)

Print a success message.

Parameters

Name Type Description
... any Values to print as success output

Returns

  • table: The prepared arguments that were printed

Usage

ax.util:PrintSuccess("Configuration saved")

ax.util:PrintWarning(...)

Print a warning message.

Parameters

Name Type Description
... any Values to print as a warning

Returns

  • table: The prepared arguments that were printed

Usage

ax.util:PrintWarning("Deprecated API used")