Pulse Works Studio

Parse Error: Unexpected identifier "export" in class body.

export is not a keyword in Godot 4. Exported properties start with @export.

Cause

The parser only accepts annotations, signals, constants, variables, functions, and inner classes at class scope. A bare export is an identifier in that position, so parsing stops before it ever sees the var.

Fix

extends Node

@export var speed: float = 220.0
@export_range(0.0, 1.0) var volume: float = 0.8
@export_file("*.tscn") var next_scene: String

Related

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