This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
scripting:console [2006-08-20 14:43] Carsten added "(in dev. mode)" to the DevWarning function. |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== The Console Library ====== | ||
- | |||
- | With the functions in the ''Console'' library you can output text on the Ca3DE in-game console. | ||
- | |||
- | |||
- | ===== Functions ===== | ||
- | |||
- | ==== Print(s) ==== | ||
- | |||
- | Prints the string ''s'' to the Ca3DE in-game console. | ||
- | |||
- | <code lua> | ||
- | -- Example: | ||
- | Console.Print("Hello!\n"); -- Prints "Hello" to the in-game console. | ||
- | </code> | ||
- | |||
- | |||
- | ==== DevPrint(s) ==== | ||
- | |||
- | 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 Ca3DE in-game console. If the "developer" console variable is not set, nothing is printed. | ||
- | |||
- | <code lua> | ||
- | -- Example: | ||
- | Console.DevPrint("Hello!\n"); -- Prints "[Dev] Hello" to the in-game console (in developer mode). | ||
- | </code> | ||
- | |||
- | |||
- | ==== Warning(s) ==== | ||
- | |||
- | Prints a warning to the Ca3DE in-game console. | ||
- | This is the same as function ''Print(s)'', except that the text "Warning:" is prepended to the output. | ||
- | |||
- | <code lua> | ||
- | -- Example: | ||
- | Console.Warning("Problem here!\n"); -- Prints "Warning: Problem here!" to the in-game console. | ||
- | Console.Print ("Warning: ".."Problem here!\n"); -- Same result as above. | ||
- | </code> | ||
- | |||
- | ==== DevWarning(s) ==== | ||
- | |||
- | 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 Ca3DE in-game console. If the "developer" console variable is not set, nothing is printed. | ||
- | |||
- | <code lua> | ||
- | -- Example: | ||
- | Console.DevWarning("Problem here!\n"); -- Prints "[Dev] Warning: Problem here!" to the in-game console (in dev. mode). | ||
- | </code> | ||