ink icon indicating copy to clipboard operation
ink copied to clipboard

Inky colour-codes logic statements differently than I expect

Open mcbaya opened this issue 3 years ago • 2 comments

Hello! I have noticed that the way Inky applies colour to logic statements in the editor is different than I would expect.

Consider this screenshot:

inky logic screencap

The code works perfectly, in that it displays "the window" whether the player is a human or a cyborg.

However, the text "human || cyborg:" is not entirely green. I would expect it to be entirely green, like other logical and conditional statements.

This happens with "OR" statements, but if I switch to "AND" it displays as I would expect:

image

I'm using Inky 0.12.0 on Windows 11.

Thank you!

mcbaya avatar Feb 08 '22 14:02 mcbaya

I do believe the problem is a conflict of marking. The inky is less intelligent than the code. It does not consider the or (||) to be an OR but to be two | marking separation in the cycle / alternative (With the second alternative just empty)

Do you know you can use or and and in your conditions ? It should remove any confusion and have your inky having the good parsing for the condition image

Selsynn avatar Feb 08 '22 18:02 Selsynn

Thank you, Selsynn. That's very helpful, and a great tip to stick to OR instead of the double pipes.

mcbaya avatar Feb 08 '22 19:02 mcbaya