title: Unity: error CS1519: Invalid token '=' in class, struct, or interface member declaration,
body: <p>I'm new to coding, and from what I gathered, the following code was written to be compatible with C# 4.0 not the current version. There is also another error that I couldn't fit in the title:
    Invalid token ';' in class, struct, or interface member declaration</p>
  
  <pre><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class camera_controller : MonoBehaviour
  {
  
      public GameObject player;
      private Vector3 offset;
      Vector3 offset = transform.position;
  
  
      // Start is called before the first frame update
      void Start()
      {
  
      }
  
      // Update is called once per frame
      void Update()
      {
  
      }
  
      void LateUpdate () 
      {
  
      transform.position=player.transform.position+offset;
  
      }
  
  }
  </code></pre>