Codeing Error

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

So I was following a tut on yt and this bit of code won’t work

func move(delta):

axis = get_input_axis()

if axis == Vector2.ZERO
	pass #apply friction
	pass #apply movement

This is in a 2d world and all that jazz but the main thing that won’t work is the
“if axis == Vector2.ZERO” The tut used a long = so I thought it was just a = but twice but I was wrong and it won’t work no matter what I do.
Any help is appreciated

:bust_in_silhouette: Reply From: spaceyjase

You’re missing a colon on the if statement.

if axis == Vector2.ZERO:

It’s always worth double-checking against the source material to confirm the code is the same, and then checking again (and in this case, reading the error message). Potentially fixing the indentation too, although I assume that’s the forum.