printError
Identical to print, however the arguments are printed in red, like an error.
  | 
  |||
| Prints "Hello, world!" to the current term in red. | |||
| Code | <nowiki>
printError("Hello, world!")
    </nowiki>
 | 
    ||
| Output | Hello, world!
 | 
    ||
  | 
  |||
| Prints "foo bar" to the current term in red. | |||
| Code | <nowiki>
printError("foo", "bar")
    </nowiki>
 | 
    ||
| Output | foo bar
 | 
    ||
  | 
  |||
| Prints strings and numbers to the current term in red, in a single print call. | |||
| Code | <nowiki>
local cats = 5
local dogs = 3
printError("Cats:", cats, "Dogs:", dogs)
    </nowiki>
 | 
    ||
| Output | Cats: 5 Dogs: 3
 | 
    ||
| printError Function  | |
|---|---|
| 
Syntax printError( 
  | |
| Returns | number linesPrinted | 
| API | BIOS globals | 
| Source | CC:Tweaked (source) | 
    This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.