[solved] syntax error in transition lua expression

the following line is not identified as valid syntax.

tonumber(new)<40

I have used this before without any problems, but all of a sudden the syntax checker shows an error (see screenshot) and the transition is not firing although it should.

[quote=“pls90, post:1, topic:197813”]the following line is not identified as valid syntax.

tonumber(new)<40

I have used this before without any problems, but all of a sudden the syntax checker shows an error (see screenshot) and the transition is not firing although it should.[/quote]

because the statement is not valid for ACE, the ACE editor expects a statement like “return tonumber(new)<40”. but ALTUI only wants the boolean expression so we get the error but it is harmless

one way to avoid it could be to type and immediately invocated anonymous function

(function()  return (tonumber(new)<40)  end)()

Thank you amg for clarifying.
Strangely

tonumber(new)=40 is a valid expression. So “=” is valid whereas “<” is not valid.

This is not much of a problem if you know what is going on.