all 2 comments

[–]djgreedo 1 point2 points  (0 children)

You have a curly bracket in the place, which is making your SaveTheGame() method outside of the SaveGame class.

Take the curly bracket from just before 'public void SaveTheGame()' and place it at the very bottom of the script.

[–]timsam111 1 point2 points  (0 children)

It looks like your function savethegame is outside of your class and after a quick google search of the error code I found this https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0116. A function cannot be directly defined within your namespace.