You're getting the error because is_action_just_pressed()
returns a bool
(so, true
or false
). And, since it's not possible to subtract one bool
from another, you get the error you mentioned. Maybe you're looking for something like:
rotation.x = Input.get_action_strength("turn_left") - Input.get_action_strength("turn_right")
... or ...
rotation.x = get_axis("turn_left", "turn_right")