Pulse Works Studio

Parse Error: Expected indented block after function declaration.

A function that ends before an indented body is incomplete.

Cause

After func and a newline, the parser consumes an indent. A blank function, a body that was left at column 0, or a paste that lost its tabs produces this message. The same pattern exists for if, for, while, and else, with the block name in the error.

Fix

func _ready() -> void:
	print("ready")

func _on_area_entered(area: Area2D) -> void:
	if area.is_in_group("hurt"):
		print(area.name)

Related

Godot Dev Tools is a Pulse Works Studio project. All error explainers.