Error CS1002 Expected (14,28)

I wrote a code for 2d character movement and I got this error that says I needed a semicolon at line 14, but I can’t find where :confused:

Code:

using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
    public float MovementSpeed = 1;
    private void Start()
    {
      
    }

     private void Update()
    {
        var movement = Input.GetAxis("Horizontal");
        transform position +- new Vector3(movement, 0, 0) * Time.deltaTime * MovementSpeed;
    }
}

Line 14, you have transform positon ±

So you appear to be missing a period and you’re trying to add and subtract.

1 Like