This is an old revision of the document!
With the functions in the Console
library you can output text on the Cafu in-game console.
Prints the string s
to the Cafu in-game console.
Name | Type | Description |
---|---|---|
s | string | The message to be printed to the in-game console. |
Nothing (nil).
Console.Print("Hello!\n"); -- Prints "Hello" to the in-game console.
Prints a developer message to the in-game console.
If the “developer” console variable is set, this prints the string s
, prepended by “[Dev] ”, to the Cafu in-game console. If the “developer” console variable is not set, nothing is printed.
Name | Type | Description |
---|---|---|
s | string | The developer message to be printed to the in-game console. |
Nothing (nil).
Console.DevPrint("Hello!\n"); -- Prints "[Dev] Hello" to the in-game console (in developer mode).
Prints a warning to the Cafu in-game console.
This is the same as function Print(s)
, except that the text “Warning: ” is automatically prepended to the output.
Name | Type | Description |
---|---|---|
s | string | The warning to be printed to the in-game console. |
Nothing (nil).
Console.Warning("Problem here!\n"); -- Prints "Warning: Problem here!" to the in-game console. Console.Print ("Warning: ".."Problem here!\n"); -- Same result as above.
Prints a developer warning to the in-game console.
If the “developer” console variable is set, this prints the string s
, prepended by “[Dev] Warning: ”, to the Cafu in-game console. If the “developer” console variable is not set, nothing is printed.
Name | Type | Description |
---|---|---|
s | string | The developer warning to be printed to the in-game console. |
Nothing (nil).
Console.DevWarning("Problem here!\n"); -- Prints "[Dev] Warning: Problem here!" to the in-game console -- (in developer mode).