Attempting to make a clicker game running into Null ReferenceException.

Hi, I am making a simple clicker game as a side project right now but my scripts aren’t properly identifying public floats.
GameManager Script:


On button press script.
5011328--490196--upload_2019-9-28_18-47-39.png

Can you post the full error message? Which line does the error occur on and in which file?

If any of your public component fields aren’t assigned, you will get a NullReferenceException when you try to use them. Check that your GameManager GM variable is set in the inspector for your Fight component, as well as all your Text components, in the GameManager.

That’s not enough information for us to help you but you most likely forgot to assign a a value to one of your public variables. Either that or you have the reference assigned and you then lose it, either because it was destroyed or lost its reference for some reason.
You should check if everything is properly assigned and see exactly what the error is because it actually tells you the line where the error is happening.