Compile error when there isnt one

i have(below) my script in c# but i get a compile error with transport how can i fix this?

void Start () {
	float maxSpeed = 1f;

}

void Update () {
     // Returns a FLOAT from -1.0 to +1.0
	Input.GetAxis ("Vertical");

	Vector3 pos = transform.position; 
	//Input.GetAxis("Verticle") 
	pos.y += maxSpeed * Time.deltaTime

	transform.position = pos;

You declare maxSpeed as a local variable of Start and then you reference it in Update where it’s not defined.
What you probably meant to do is declare it outside the Start method as a class variable.

Here is a fixed C# script:

using UnityEngine;

public class ExampleClass : MonoBehaviour {
    public float maxSpeed=1f;

    void Update() {
        Input.GetAxis ("Vertical"); 
 
        Vector3 pos = transform.position; 
        pos.y+=maxSpeed*Time.deltaTime; 
        transform.position = pos; 
    }
}

Definite compile time errors

  1. Line 13 is missing a semi colon
  2. maxSpeed is a local variable of Start

Other errors if this is your entire script

  1. files have to be told what libraries are being used in C#. The first line should be

    using UnityEngine;

  2. Methods have to be members of classes in C# and this should be enclosed in a class, i.e.

    public class ExampleClass : MonoBehaviour {}

  3. The Update function is not closed