- Edited
Carmes as mentioned by @Toxe, the error is in the function definition as it is missing a ':'...
func _velocity(0, 0): # <- ':' here to end the function declaration
position += velocity * delta
# the rest of the code
Note the formatting (e.g. spaces or tabs that align your code) are also important. Always worth taking a break and double-checking the code against the docs (to fix further script errors!).
But I think what you really want to do is as stated in the docs and remove the func _velocity(0, 0)
:
Add the following to the bottom of the _process function (make sure it's not indented under the else):
position += velocity * delta
position.x = clamp(position.x, 0, screen_size.x)
position.y = clamp(position.y, 0, screen_size.y)