Cant attach script to a prefab

Hi im new to unity and am following a youtube tutorial but at timestmap 9:33 of the video: Unity Roguelike Tutorial : Full Series - YouTube I have an error called “cant add script component ‘Player’ because script class cannot be found”

My code:

,Hi having abit of trouble attaching my script to a prefab following a tutorial video timestamp 9:33 Unity Roguelike Tutorial : Full Series - YouTube

my code:

Hey and welcome to the forum,

the most probable cause here is that you did not name the file containing the code Player.cs. Any MonoBehaviour class must be in a file named exactly the same as the class itself. Otherwise it will not be found.

Next time please do not post code as images - use the code formatting helper (button with 010101) to post code.