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

I have problem with my script

Discussion in 'Scripting' started by Kubeczek14, May 25, 2020.

  1. Kubeczek14

    Kubeczek14

    Joined:
    May 25, 2020
    Posts:
    3
    Hello, So basically im a begginer scripter, like for 5 days i guess. So i basically have a couple problems with my script. (Its some basic script)
    Heres the script:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    {
    Public int Speed = 200:

    {
    if.Speed = 200
    debug log(Hello);
    }
    }


    Heres the problems:
    Assets\Variables.cs(5,1): error CS1022: Type or namespace definition, or end-of-file expected
    Assets\Variables.cs(6,5): error CS0116: A namespace cannot directly contain members such as fields or methods
    Assets\Variables.cs(6,26): error CS1002: ; expected
    Assets\Variables.cs(6,26): error CS1022: Type or namespace definition, or end-of-file expected
    Assets\Variables.cs(9,12): error CS0116: A namespace cannot directly contain members such as fields or
    methods
    Assets\Variables.cs(9,17): error CS1022: Type or namespace definition, or end-of-file expected
    Assets\Variables.cs(10,24): error CS1001: Identifier expected
    Assets\Variables.cs(11,5): error CS1022: Type or namespace definition, or end-of-file expected
    Assets\Variables.cs(12,1): error CS1022: Type or namespace definition, or end-of-file expected
    Assets\debug log lmao.cs(7,20): error CS1002: ; expected
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
  3. leftshoe18

    leftshoe18

    Joined:
    Jul 29, 2017
    Posts:
    61
    There isn't a class name or any functions.