Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Critical errors with a program in lvl controller after loading saved game
#8
Quote: I also realized that it might be that there are too many instances of Camps being created over the time.
Tongue
That's what singleton would fix. Though, do you even operate on the values in Camps? If not, there shouldn't be a problem with having multiple instances... unless you have problems with memory then.

I wanted to convert Camps to singleton, but I have problems with making a static method for getInstance(). Oo' CBOT environment in the game says "Type declaration missing" if I add "static" and that's strange because I didn't remove anything. And idk how I can access static method from the outside anyway. (ClassName.method() doesn't work.) 
...I think I still prefer normal languages.


Messages In This Thread
RE: Critical errors with a program in lvl controller after loading saved game - by hazel - 02-19-2018, 10:43 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)