What does error CS1022: Type or namespace definition, or end-of-file expected mean?

This is a simple move script i made but Unity keeps saying
Im making a simple move script and nothing looks wrong with it but this error keep popping up → error CS1022: Type or namespace definition, or end-of-file expected

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

public class move : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        public float HorizontalInput;
        public float ForwardInput;
    }

    // Update is called once per frame
    void Update()
    {
        HorizontalInput = Input.GetAxis("Horizontal");
        ForwardInput = Input.GetAxis("Vertical");
        transform.Translate(Vector3.forward * Time.deltatime * ForwardInput);
        transform.Translate(Vector3.forward * Time.deltatime * HorizontalInput);
    }
}

You have declared your public variables inside of Start.

Field declarations don’t go inside methods.

Definitely brush up on some basic C#.

Plenty wrong with it, as Spiney already pointed out.

As it is obvious you’re getting this from a tutorial, keep in mind there’s only two (2) steps to doing tutorials correctly, and you are currently failing to do step #1.

Two steps to tutorials and / or example code:

  1. do them perfectly, to the letter (zero typos, including punctuation and capitalization)
  2. stop and understand each step to understand what is going on.

If you go past anything that you don’t understand, then you’re just mimicking what you saw without actually learning, essentially wasting your own time. It’s only two steps. Don’t skip either step.

I suggest moving at a very deliberate step-by-step pace, otherwise you get in over your head and have no idea what is happening.

Imphenzia: How Did I Learn To Make Games: