SCRIPT ERROR: GDScript::reload:

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

The code of the KinematicBody2D is the following:

extends KinematicBody2D

var vel=Vector2()
var gravity:float=4

func _physics_process(delta):

rotation +=7*delta
vel.x=120
vel.y +=gravity
var collision=move_and_collide(vel*delta)
if collision:
	get_node("Sound").play()
	vel=vel.bounce(collision.normal)
	vel.y=-240

When i start my project i have this error in the console:

SCRIPT ERROR: GDScript::reload: Parse Error: Method ‘move_and_collide’ is not de
clared in the current class.
At: res://Spawner2.gd:12

When i run the game i have no problems and there is no cautions or something.This error shows up in console when i open my project.

Any idea please?
Thank you.