Search Unity

Error C21002, Help

Discussion in 'Getting Started' started by robbertjounior, Jun 30, 2020.

  1. robbertjounior

    robbertjounior

    Joined:
    Jun 19, 2020
    Posts:
    1
    I've been trying to solve a problem while making a 3d game, But the console is always telling me: error CS1002: ;expected. Heres my code:

    using UnityEngine;

    public class PlayerMovment : MonoBehaviour
    {
    public Rigidbody rb;

    // Start is called before the first frame update
    void Start()
    {
    Debug.Log("Hello,World!")
    }

    // Update is called once per frame
    void Update()
    {

    }
    }

    Can someone please help me?
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Please use code tags when posting code on the forums.

    You're missing a semicolon after the Debug.Log statement in the Start method.

    The error message will have two numbers at the end of it that indicate the line & character number of the error in the script respectively.
     
    JoeStrout likes this.