- Home /
Object reference not set to an instance of an object
Im new to this and trying to figure it out myself is painful... This is my code!
Error: NullReferenceException: Object reference not set to an instance of an object Harvest_Gold.Update () (at Assets/Scripts/Harvest_Gold.cs:13)
Code: http://pastebin.com/LA0bbvCw
Used In: http://pastebin.com/qfbGfaku
Thanks in advance! :)
my guess is that here cashTotal.text = "Cash: " + CurrencyConverter.Instance.GetCurrencyIntoString(cash, false, false); i think your trying to reference CurrencyConverter, but its not actually used in this script so there is no actual instance of it.
Well in the tutorial i was watching that im pritty sure i coded down more or less identicle has everything coded like i have in pastebin.... but that was in versions below "5.anything" so maybe its different... Would you have any suggestions on how i can make this all work ? i cant progress with anything new until its solved nor can i test my game out.
Thanks in advance :)
The instance of CurrencyConverter is null. Is the script placed on a object in the scene? Is instance being set?
Jessespike you made me face palm so hard..... I made a "Create Empty" and never even added my converter to it that has now made everything work. X_X Thanks guys :) ill be sure to double check everything i do or i should say double triple check XD
Your answer
Follow this Question
Related Questions
Help Error CS0111 1 Answer
Animation won't play? Please help! 7 Answers
2D repeating obstacles with a random Y value 0 Answers