trace - nesbox/TIC-80 GitHub Wiki
trace(message, [color=15])
Parameters
- message : the string to print.
- color : a color index (0..15)
Description
This is a service function, useful for debugging. It prints the supplied string or variable to the console in the (optional) color specified.
Tips:
- The Lua concatenation operator is
..
(two periods) - Use the console cls command to clear the output from trace
- Simple variables are automatically converted to strings
Example
-- trace demo
cls()
function TIC()
trace('Hello console:'..time())
trace('This text is blue',8)
end
GIF example: