Attention | Topic was automatically imported from the old Question2Answer platform. | |
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()