Expected indented block after "if" block. when YouTube video has no issues with the same thing

Godot Version

4.3

Question

` Hello I"m trying to program a first person POV and I"m following the video tutorial “Juiced Up First Person Character Controller Tutorial - Godot 3D FPS” it has been very helpful but at 3:40 when I put in (if event is InputEventMouseMotion) it gives me Expected “:” after “if” condition and Expected indented block after “if” block. When the video has no such issues, I’m extremely new to this, so any help will be awesome!

GDScript’s syntax expects an if-statement to end with a : where the contents of the if-statement is denoted by an indent. As an example:

if event is InputEventMouseMotion:
	# Do something

Relevant documentation page: GDScript Basics | if/else/elif

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.