game development – Unexpected assign inside a signal Godot

I need to assign a variable inside a signal, what I did is something like this:

var cross_river = false

func _on_unlock_crossing_river_area_entered(area)

cross_river = true

pass

but Godot always returns an “unexpected assign” error

how could I solve this problem???