I am following a tutorial and this error is coming up.
0:00:01:0857 - Condition ' _debug_parse_err_line >= 0 ' is true. returned: __null
----------
Type:Error
Description:
Time: 0:00:01:0857
C Error: Condition ' _debug_parse_err_line >= 0 ' is true. returned: __null
C Source: modules/gdscript/gdscript_editor.cpp:287
C Function: debug_get_stack_level_instance
Identifier not found: rotation_dir
Here is the script:
extends RigidBody2D
export(float) var engine_thrust = 200
export(float) var spin_thrust = 2000
var thrust = Vector2()
var roation_dir = 0
func _ready():
# Called when the node is added to the scene for the first time.
# Initialization here
pass
func _process(delta):
if Input.is_action_pressed("ui_up"):
thrust = Vector2(engine_thrust, 0)
else:
thrust = Vector2()
if Input.is_action_pressed("ui_left"):
roation_dir = -1
elif Input.is_action_pressed("ui_right"):
roation_dir = 1
else:
roation_dir = 0
pass
func _integrate_forces(state):
set_applied_force(thrust.rotated(rotation))
set_applied_torque(rotation_dir * spin_thrust)
pass