Tic-80: trace() is useless for truth/false values

Created on 3 Jun 2017  路  4Comments  路  Source: nesbox/TIC-80

Try the following code:

trace(2+2==4)

It will return always nil instead of true/false which makes trace() useless for debugging conditions. It will return nil in the case that conditional would result in false as well such as this: trace(3-3==math.sqrt(math.pi))

enhancement

All 4 comments

Use the function tostring:

trace(tostring(2+2==4))

But yes, it could be a regular behavior of the trace function same as in the standard lua print function.

trace(tostring(2+2==4))

Ahh, @Crutiatix beat me to it.

^

added tostring behavior to print/font/trace api
done in .27

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ViChyavIn picture ViChyavIn  路  6Comments

sssilver picture sssilver  路  3Comments

BraininaBowl picture BraininaBowl  路  3Comments

msx80 picture msx80  路  5Comments

ambyra picture ambyra  路  6Comments