The real issue here is that you’re approaching learning programming the wrong way. Instead of learning the fundamentals and building a solid foundation, you keep focusing only on solving whatever problem appears in front of you at the moment. As a result, you continue making the same basic mistakes over and over again. Combined with the fact that you often ignore about 90% of the advice you’re given and only focus on the 10% you believe is immediately relevant, this makes it very difficult to actually learn how to program. At best, it provides a temporary fix for the problem of the day.
One example is your reply here:
If you’re already aware of a solution to an issue, you should implement it. There’s little value in postponing it until you’ve solved some other problem first.
Another example is in this thread:
You clicked “Like” on the answer, but that doesn’t mean much if you never apply the advice. Not providing feedback about whether a solution worked, ignoring answers, and immediately moving on to the next problem only leads to going in circles and repeating the same mistakes.
The advice Kurt-Dekker gave you in this thread had already been given to you before:
Yet it was ignored, and the result is that you’re facing the same issue again.
The same applies to the advice CodeSmile gave in this thread:
This is also advice they had already given you previously:
All of this is relevant because if you had actually followed that advice, you wouldn’t be facing the issue you’re dealing with today. The error:
is telling you that LvlManager.money cannot be accessed through an instance reference (using the singleton instance) because it is declared as a static field:
public static int money;
If, instead of focusing only on the immediate problem, you took the time to read and understand the advice being given, this wouldn’t be an issue. In fact, in earlier versions of your script, money was already implemented as an instance member, for example here:
There’s no benefit in ignoring parts of an answer because you think they aren’t relevant. There’s no benefit in moving on to the next problem without reporting whether a solution worked. There’s also no benefit in trying random keywords until something appears to work. That approach simply doesn’t lead to meaningful progress.
Take some time to learn the fundamentals instead of treating every compiler error as an isolated problem that requires a new forum post. Otherwise, you’ll continue fixing one error by applying only part of the advice, creating another issue, asking for help again, and repeating the same cycle.
This LevelManager script has been causing problems for over a month. Realistically, if you had combined and applied the advice you’ve already received across your various topics, it could have been resolved within a week at most.
This also ties directly into the topic you created here:
The best thing you can do before even thinking about building a portfolio is to learn the fundamentals. Constantly seeking answers for individual problems, while ignoring most of the explanations behind those answers, won’t help you develop the skills needed to solve problems independently. Likewise, ignoring feedback and repeatedly creating new topics about the same underlying concepts only ensures that the same issues will continue to resurface.