"No MonoBehavior scripts in the file, or their names do not match the file name" error stopping me from doing the Roll-the-ball lesson

I’ve already made a question post previously on this exact same issue, but it’s been a week without a response so I’m going to shorten it.


I got Unity recently to try learning how to code with the program. When I wrote my first script for the lesson I got an error message (see title) that stops me from testing my game and thus making it impossible for me to learn the lesson. Everything I’ve found while searching for a fix wasn’t a functionality error like mine but rather just an error on the fault of the person submitting it (I.E. typed the code wrong) so there isn’t anything for me to troubleshoot off of. I have no clue what to do and the 3 days of frustration built up from me trying to substitute Visual Studio in the place of MonoDevelop and the several features absent or misdirected aren’t helping.


Here’s some screenshots of my Unity app and my Visual Studio code in case it’d be of some use:


alt text
alt text

Make sure in front of the class name it says :MonoBehavior, and make sure the name of your class is the same as the name of the c# file .
I think you need to upload the screen shots again, they aren’t showing up