Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Assets\player_movement.cs(26,20): error CS1002: ; expected does anybody know how to fix this

Discussion in 'Editor & General Support' started by KARIderpARI, Nov 28, 2020.

  1. KARIderpARI

    KARIderpARI

    Joined:
    Nov 28, 2020
    Posts:
    4
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class PlayerMovement : MonoBehaviour
    {
    public float MovementSpeed = 1;
    public void Start()
    {

    }


    public void Update()
    {
    Var movement = input.GetAxis("Horizontal");
    transform.position += new Vector3(movement,0,0) * Time.deltaTime * MovementSpeed;
    }
    }
     

    Attached Files:

  2. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    The error does not reference this script. Do you have a script named player_movement.cs?
     
  3. KARIderpARI

    KARIderpARI

    Joined:
    Nov 28, 2020
    Posts:
    4
    oh wait i still had my old script in the files thx
     
  4. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    190