This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
scripting:console [2006-08-20 14:41] Carsten created |
scripting:console [2006-09-17 19:19] Carsten revised the mark-up details |
||
---|---|---|---|
Line 4: | Line 4: | ||
- | ===== Functions ===== | + | ===== Print(s) ===== |
- | + | ||
- | ==== Print(s) ==== | + | |
Prints the string ''s'' to the Ca3DE in-game console. | Prints the string ''s'' to the Ca3DE in-game console. | ||
+ | === Returns: === | ||
+ | Nothing (nil). | ||
+ | |||
+ | === Example: === | ||
<code lua> | <code lua> | ||
- | -- Example: | ||
Console.Print("Hello!\n"); -- Prints "Hello" to the in-game console. | Console.Print("Hello!\n"); -- Prints "Hello" to the in-game console. | ||
</code> | </code> | ||
- | ==== DevPrint(s) ==== | + | ===== DevPrint(s) ===== |
Prints a developer message to the in-game console. | Prints a developer message to the in-game console. | ||
Line 22: | Line 23: | ||
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. | 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. | ||
+ | === Returns: === | ||
+ | Nothing (nil). | ||
+ | |||
+ | === Example: === | ||
<code lua> | <code lua> | ||
- | -- Example: | ||
Console.DevPrint("Hello!\n"); -- Prints "[Dev] Hello" to the in-game console (in developer mode). | Console.DevPrint("Hello!\n"); -- Prints "[Dev] Hello" to the in-game console (in developer mode). | ||
</code> | </code> | ||
- | ==== Warning(s) ==== | + | ===== Warning(s) ===== |
Prints a warning to the Ca3DE in-game console. | 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. | This is the same as function ''Print(s)'', except that the text "Warning:" is prepended to the output. | ||
+ | === Returns: === | ||
+ | Nothing (nil). | ||
+ | |||
+ | === Example: === | ||
<code lua> | <code lua> | ||
- | -- Example: | ||
Console.Warning("Problem here!\n"); -- Prints "Warning: Problem here!" to the in-game console. | Console.Warning("Problem here!\n"); -- Prints "Warning: Problem here!" to the in-game console. | ||
Console.Print ("Warning: ".."Problem here!\n"); -- Same result as above. | Console.Print ("Warning: ".."Problem here!\n"); -- Same result as above. | ||
</code> | </code> | ||
- | ==== DevWarning(s) ==== | + | |
+ | ===== DevWarning(s) ===== | ||
Prints a developer warning to the in-game console. | Prints a developer warning to the in-game console. | ||
Line 45: | Line 53: | ||
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. | 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. | ||
+ | === Returns: === | ||
+ | Nothing (nil). | ||
+ | |||
+ | === Example: === | ||
<code lua> | <code lua> | ||
- | -- Example: | + | Console.DevWarning("Problem here!\n"); -- Prints "[Dev] Warning: Problem here!" to the in-game console |
- | Console.DevWarning("Problem here!\n"); -- Prints "[Dev] Warning: Problem here!" to the in-game console. | + | -- (in developer mode). |
</code> | </code> | ||