what is wrong with my code????

v4.5.1

What’s wrong with this code:

extends CharacterBody2D

var gravity : float = 981
var JumpForce : float = 400
func _physics_process(delta: float) → void:

The last line is the incorrect part; What’s wrong with it?

It’s very likely that you simply need the pass keyword under it.

1 Like

Hi,

If that’s your full code, the issue is that the function needs a body:

func _physics_process(delta: float) → void:
    pass