NullReferenceException: Object Reference not set to an instance of an object

Hello, I’m trying to make a Tower Defense game and my economy system is giving me issues. Currently I have it set to provide money equal damage dealt to enemies, a display for how much money the player has and a cost for placing towers. My issue is when I go to press the button to begin placing a tower i get the error in the Title, which prevents placement. I will include the error, the line it is referencing and other parts of the code that I believe are related. What can I do to fix this? Any help would be much appreciated.

9798783--1406445--5.png

The answer is always the same… ALWAYS!

How to fix a NullReferenceException error

https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

Three steps to success:

  • Identify what is null ← any other action taken before this step is WASTED TIME
  • Identify why it is null
  • Fix that