Parsing error. No idea what it is or what the problem is.

I get this error:

Assets/Nathansassets/Game Music.cs(1,28): error CS8025: Parsing error

Whenever I try to compile this C# script.

private static var instance: MyUnitySingleton
public static function GetInstance() : MyUnitySingleton {
return instance;
}

function Awake() {
    if (instance != null && instance != this) {
        Destroy(this.gameObject);
        return;
    } else {
        instance = this;
    }
    DontDestroyOnLoad(this.gameObject);
}

I have no idea what the problem is, to me the code seems almost flawless.

That’s JavaScript. Your filename is .cs

Maybe a private static var instance needs an initializer like this?

private static var instance: MyUnitySingleton = null;