how do I resolve this error?

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

The image isn’t expandable and it’s too small to read any error. Maybe paste the error text directly?

jgodfrey | 2020-05-01 20:17

toda vez que faço o codigo

extends Node2D

var move = Vector2 ()

func _physics_process(delta)
if Input.is_action_pressed (“ui_right”):
move = 100
if Input.is_action_pressed (“ui_left”):
move =100

    move_and_collide(move)

aparece error(9,24) The method “move_and_collide” isn’t declared in the current class

ikaro001 | 2020-05-01 20:33

move_and_collide() is a KinematicBody method. Change extends Node2D to extends KinematicBody2D.

Also you’ll get more errors with move = 100. move is a Vector2 so it needs to be something like move = Vector2(100, 0) or move = Vector2.RIGHT*100

Magso | 2020-05-01 21:16

Outro erro é
The argument (delta) is never used in the function ‘_physics_process’. If this intended prefix It with an underscore: ‘_delta’

ikaro001 | 2020-05-03 19:26