Unexpected "identifier" in class body error

4.3.stable

I am getting an Unexpected “identifier” in class body this is the code thats there

func_physics_process(delta) :
var input=0 i am also getting an expected end of file on this line

This is my full code for reference: func player_movement(input, delta):

if input: velocity = velocity.move_toward(input *

SPEED, delta * ACCELERATION)

else: velocity =

velocity.move_toward(Vector2(0,0), delta *

FRICTION)

func_physics_process(delta):

var input =

Input.get_vector(“ui_left”,“ui_right”,“ui_up”,"ui_dow

n")

player_movement(input, delta)

move_and_slide()

Any help at all would be welcomed im fairly new

You need to put a space between the func and the _physics_process


Also, use the code formatting button when sharing code, it’s hard to read the code as is

image

2 Likes

Ahh tysm