Skip to main content

Console

Quick Reference​

NameTypeDescription
LogSharedPrints a message to the console and the log file.

Shared Functions​

Log​

Prints a message to the console and the log file.

Console.Log(string message)

JavaScript

console.log(...) works as well and takes any number of arguments of any type; objects are printed as JSON. console.warn and console.error write to the log at the matching level.

Example:

Events.Subscribe("playerDisconnect", function(id, name, reason)
Console.Log("Player " .. name .. " has left the server with reason " .. reason .. ".")
end)