Skip to content

log

The primary debugging tool for monitoring script behavior and identifying errors in real-time.

The explicit namespace call. Recommended for clarity in larger projects.

ac.log("Script initialized")

ac.log outputs text to both the physical log file on your drive and the in-game Lua Debug app’s console. It accepts a variable number of arguments and automatically joins them with spaces. Primitive values and CSP-specific types such as vec3, rgb, and rgbm are converted into readable string representations.

ParameterTypeRequiredDescription
...anyYesOne or more values to be stringified and logged.

Passing multiple mixed-type variables to track state.

local gear = 4
local speed = 120.5
ac.log("Vehicle Status:", "Gear", gear, "Speed", speed)
-- output: Vehicle Status: Gear 4 Speed 120.5