Error at (15, 1): Unexpected "Indent" in class body

Godot Version

4.6

Question:

func _physics_process(delta: float) -> void:ar
	if player > 0:
		camera_2d.enabled = true
	# Add the gravity.
	if not is_on_floor():
		velocity += get_gravity() * delta

This error does not seem to have appeared for a reason.

What is ar?

2 Likes

Your return says it’s void so the ar doesn’t make sense. It means nothing will be returned from the function. You should be able to delete the “ar” which isn’t a type anyway.
func _physics_process(delta: float) → void: