Var rotate = randi() % 2 == 0 ? -1 : 1

Godot Version

4.2.1

Question

var rotate = randi() % 2 == 0 ? -1 : 1

but next error: Unexpected “?” in source. If you want a ternary operator, use “truthy_value if true_condition else falsy_value”.
Expected end of statement after variable declaration, found “Literal” instead.