Hey guys,
I wanted to make an array which contains different objects of one class.
It is defined as:
CSolarSystem[ ] knownSolarSystems;
But if I try to fill an instance of this array with an object I get this error:
NullReferenceException: Object reference not set to an instance of an object
The code which fills the class looks like this
knownSolarSystems = new CSolarSystem[10];
knownSolarSystems [0].Start();
knownSolarSystems [1].Start();