can u help me with tis problem Parser Error: Expected end of statement ("var"), got '-' instead.

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

here is my code can u repair it?
extends KinematicBody2D

var speed = 100
var motion - Vector2(0, 0)

func _ready():

func _physics_process(_delta):
if Input.is_action_pressed(“ui_left”):
motion.x -= speed * delta
elif Input.is_action_pressed(“ui_rigth”):
motion.x += speed * delta
elif Input.is_action_pressed(“ui_down”):
motion.y -= speed * delta
elif Input.is_action_pressed(“ui_up”):
motion.y += speed * delta
motion.y = 0
motion.x = 0

:bust_in_silhouette: Reply From: jgodfrey

I assume your error is here:

var motion - Vector2(0, 0)

That should probably be:

var motion = Vector2(0, 0)