title: Error CS1022: Type or namespace definition, or end-of-file expected in unity
body: <p>I have an error that I cannot figure out in Unity.</p>
  
  <p>What this does (I think) is move a platform to and from points.</p>
  
  <p>I have just put some text here so I can actually post this... why does stack overflow do this.</p>
  
  <p>Here's the error: </p>
  
  <blockquote>
    <p>Assets\Scripts\Mover.cs(74,1): error CS1022: Type or namespace definition, or end-of-file expected</p>
  </blockquote>
  
  <p>Here's the code: </p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class Mover : MonoBehaviour {
  
    public Vector3[] points;
    public int point_number = 0;
    private Vector3 current_target;
  
    public float tolerance;
    public float speed;
    public float delay_time;
  
    private float delay_start;
  
    public bool automatic;
  
  
      // Start is called before the first frame update
      void Start()
      {
           if(points.lengh &gt; 0)
           {
             current_target = 0;
           }
           time = speed * Time.deltaTime;
         }
      }
  
      // Update is called once per frame
      void Update()
      {
          if(transform.position != current_target)
          {
             MovePlatform();
          }
          else
          {
              UpdateTarget();
          }
      }
  
      void  MovePlatform()
      {
        Vector3 heading = current_target - transform.position;
        transform.position += (heading / heading.magnitude) * speed * time.deltaTime;
         if(heading.magnitude = tolerance)
         {
          transform.position = current_target;
          delay_start = Time.time;
         }
      }
      void UpdateTarget()
      {
        if(automatic)
        {
            if(Time.time - delay_start &gt; delay_time)
            {
             NextPlatform();
            }
         }
      }
      public void NextPlatform()
      {
          point_number ++;
          if(point_number &gt;= points.Length)
          {
            point_number = 0;
          }
          current_target = points[point_number];
      }
  }
  </code></pre>