Hi, just incase the subject doesn't quite explain my problem, here is a bit more detail...
I am trying to use the below code:
Type TPlanet
Mass as Integer
EndType
Type TSolarSystem
Planet(5) As TPlanet
EndType
Dim Systems(5) As TSolarSystem
This code does not work and I am unsure why this would not be allowed. Is there anyway I could re-phrase the code to make it work?
I really don't want to go through the effort of having:
Type TSolarSystem
Planet1 As TPlanet
Planet2 As TPlanet
Planet3 As TPlanet
Planet4 As TPlanet
Planet5 As TPlanet
EndType
That just seems to much effort to be the only way of doing this.
If there is no way of using an array within the type, is there a function which allows me to use a string varaible to refer to a variable? IE:
Assign("System(1)." + PlanetID$ + ".Mass" , 1)
I know thats a bit crazy, but if I was to have about 100 systems with just 10 planets each, the amount of typing to have them update would be painful if I have to refer to them all individually... But it seems like I will have to.
Any help is much appreciated, thanks for reading.