Can't fill a slot of an array with class objects

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();

oh sry i’m stupid…
Fix’d it:

knownSolarSystems[0] = new CSolarSystem();
knownSolarSystems[0].Start();
works fine now :slight_smile: