If that is literally all your code, then:
- It needs to be inside a function (probably the _process function)
- Something needs to happen in the if statement
Something like:
func _process(delta):
var direction = Input.get_vector(“left”, “right”, “up”, “down”)
if direction.x == 0 and direction.y == 0:
print("Direction is (0, 0)")
But as @gertkeno said, it’s hard to help more without you giving more information.