Hello, I use the 4.3 version of Godot and i’m a complete beginner at programming. I’m making a 2D platformer game for a school project and I’m a bit lost with scripting since I only followed tutorials or asked AI for help.
Question
Why do I get a red error saying : Unexpected '“Identifier” in class body along with a yellow error saying : the parameter “area” is never used in the function “_on_area_2d_area_entered()” on the first line of my script.
Here is my script:
extends RigidBody2D
export var speed = 100
var velocity = Vector2()
func _physics_process(delta):
var player = get_parent().get_node(“player”)
velocity = position.direction_to(player.poition) * speed
velocity = move_and_slide(velocity)
look_at(player.position)