Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | abelgutierrez99 |
Hi,
I’m triying to asign a variable value, that depends on some if/else statement, in one line. I’m trying var offsetX : float = 1 if (sizeX%2 == 0) else 0.5
but the error Values of the ternary conditional are not mutually compatible
appears in the debugger. In other script var dir : int = 1 if invert_y else -1
works, now I can’t see the error.