Parser Error: Expected an Identifier for an argument

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Aquilta

func calculate_move_velocity(
linear_velocity: Vector2,
direction: Vector2,
speed: Vector2,
) → Vector2: ← Error is on this line
var new_velocity: = linear_velocity
new_velocity.x = speed.x * direction.x
new_velocity.y += gravity * get_physics_process_delta_time()
if direction.y == -1.0:
velocity.y = speed.y * direction.y
return speed * direction

:bust_in_silhouette: Reply From: Lopy

speed: Vector2, ←Extraenous comma.
) -> Vector2:

It worked, thank you!

Aquilta | 2021-01-28 00:20