User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scripting:console [2006-08-20 14:41]
Carsten created
scripting:console [2011-03-14 13:44]
Carsten Deleted page, contents has been migrated to http://api.cafu.de/scripting/classConsole.html
Line 1: Line 1:
 ====== The Console Library ====== ====== The Console Library ======
  
-With the functions in the ''​Console''​ library you can output text on the Ca3DE in-game console.+With the functions in the ''​Console''​ library you can output text on the Cafu in-game console.
  
  
-===== Functions ​=====+===== Print(s) ​=====
  
-==== Print(s) ====+Prints the string ''​s''​ to the Cafu in-game console.
  
-Prints the string ''​s'' ​to the Ca3DE in-game console.+=== Parameters: === 
 +^ Name ^ Type ^ Description ^ 
 +| string | The message to be printed ​to the 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.
  
-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 Cafu in-game console. If the "​developer"​ console variable is not set, nothing is printed.
  
 +=== Parameters: ===
 +^ Name ^ Type ^ Description ^
 +| s | string | The developer message to be printed to the in-game console. |
 +
 +=== 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 Cafu 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 automatically ​prepended to the output.
  
 +=== Parameters: ===
 +^ Name ^ Type ^ Description ^
 +| s | string | The warning to be printed to the in-game console. |
 +
 +=== 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.
  
-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 Cafu in-game console. If the "​developer"​ console variable is not set, nothing is printed
 + 
 +=== Parameters: === 
 +^ Name ^ Type ^ Description ^ 
 +| s | string | The developer warning to be printed to the in-game console. | 
 + 
 +=== 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>​