Riferimento API di nanos world Documentazione italiana non ufficiale
Documentazione ufficiale
Funzione statica Condiviso Veloce

Console.Log

Logs and formats a message in the console, with formatted arguments

Non ancora tradotto

Sintassi

Lua
Console.Log(message, args... = nil)

Parametri

Nome Tipo Predefinito Descrizione
message string — Message to print
args... facoltativo any nil Other arguments to format with the message using string.format

Esempi

Basic
Console.Log("Hello, world!")
With formatting (string)
local player_name = "John",Console.Log("Hello %s!", player_name)
With formatting (integer)
local health = 50,local max_health = 100,Console.Log("Player health: %d/%d", health, max_health)