outputDebugString
Shared
Writes a line to this side's script log, as an error, a warning or a message.
bool outputDebugString(string text [, int level = 3])
Parameters
| Name | Type | Description |
|---|---|---|
| text | string | The text. |
| level | int | 1 error, 2 warning; any other value is a plain message. Errors and warnings carry the file and line they came from.default 3 |
Returns
true once the line is written.
An error or warning repeated within 5 seconds is written once and then summed up with [DUP xN]. The line first goes through onDebugMessage (onClientDebugMessage on a client), which may cancel it.
Example
local ok = setTime(12, 0)
if not ok then
outputDebugString("Could not set the time", 2)
end