erro move_and_slide

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Eandro

I’m starting to study and found this error during a video class.
unexpected token: identifier:move_and_slide

extends KinematicBody2D
const UP = Vector2(0, -1)
const GRAVITY = 20
const SPEED = 200
const JUMP_HEIGHT = -550

var motion = Vector2()

func _physics_process(delta):
motion.y += GRAVITY
if Input.is_action_pressed(“ui_right”):
motion.x= SPEED
elif Input.is_action_pressed(“ui_left”):
motion.x= -SPEED
else:
motion.x=0
if is_on_floor():
if Input.is_action_pressed(“ui_up”):
motion.y = JUMP_HEIGHT

move_and_slide(motion,UP)

erro:E 0:00:00:0749 Condition ’ _debug_parse_err_line >= 0 ’ is true. returned: __null
modules/gdscript/gdscript_editor.cpp:330 @ debug_get_stack_level_instance()

:bust_in_silhouette: Reply From: Eandro

I managed to find the error. It was just an indentation problem. The move_and_slide expression should be aligned with the function that quotes delta.