Search Unity

Question I got 6 errors and I don't find them can somebody help me?

Discussion in 'Scripting' started by HyperpixelGameStudios, Mar 29, 2023.

  1. HyperpixelGameStudios

    HyperpixelGameStudios

    Joined:
    Mar 28, 2023
    Posts:
    3
    I attached my script. I already searched for two hours but I dont find the problem. I didn't even write any script but the error happens anyways. I think I just type the errors right here:
    ~/3rdPersonCam.cs(5,14): error CS1001: Identifier expected
    ~/3rdPersonCam.cs(5,14): error CS1514: { expected
    ~/3rdPersonCam.cs(5,14): error CS1513: } expected
    ~/3rdPersonCam.cs(5,14): error CS8803: Top-leven statements must precede namespace and type declarations
    ~/3rdPersonCam.cs(5,15): error CS1002: ; expected
    ~/3rdPersonCam.cs(5,42): error CS1002: ; expected
    Thank you if you would respond! If you can't see my script somehow here it is as text:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class 3rdPersonCam : MonoBehaviour
    {
    // Start is called before the first frame update
    void Start()
    {

    }

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

    }
    }
     

    Attached Files:

  2. Nefisto

    Nefisto

    Joined:
    Sep 17, 2014
    Posts:
    335
    You can't start a script name with a number
     
    Bunny83 likes this.
  3. HyperpixelGameStudios

    HyperpixelGameStudios

    Joined:
    Mar 28, 2023
    Posts:
    3
    Oh, thank you!:)
     
    Bunny83 likes this.