Can't add script to gameobject even though there are no compiler errors in the script and the class name matches the script name

I’m not sure but I think it could be because of an error in another script? FWIW I can’t play my game Error message:

Are you sure that your class derives from MonoBehaviour?