Error parsing expression, how to fix?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Miguelxi
    extends KinematicBody
var gravity =Vector3.DOWN * 12
var speed = 4
var jump_speed = 6
var velocity = Vector3()
func _physics_process(delta):
	velocity += gravity * delta
	get_input()
	velocity = move_and_slide(velocity,Vector3.UP)
func get_input():
	velocity.x = 0
	velocity.z = 0
	if Input.is_action_pressed("move_forward"):
		velocity.z -= speed
		if Input.is_action_pressed("move_back"):
			velocity.z -= speed
		if Input.is_action_pressed("strafe_right"):
			velocity.x -= speed
		if Input.is_action_pressed("strafe_left"):
			velocity.x -= speed
			func _unhandled_input(event):
	   if event is  InputEventMouseMotion:

I am getting a error on line 21 (Error parsing expression, misplaced: func)
I added indentation and there were no extra spaces, Does anybody know how to fix this?

:bust_in_silhouette: Reply From: exuin

Don’t add indentation to a function declaration.

Thanks for the help it works now

Miguelxi | 2021-03-17 21:22