Though this isn't really hard, and I think I've done things like this before, I've thought hard for at least two minutes, and I still can't figure out how to do it.
So, basically, I have ships. Some ships belong to squadrons of five ships each. I've decided to store squadrons as types with the variable ships[5] to hold all of the ships in the squadron.
My problem comes when adding ships to a squadron. Say I create a new squadron:
And now I try to add a ship to it:
Which doesn't work. Any ideas?
So, basically, I have ships. Some ships belong to squadrons of five ships each. I've decided to store squadrons as types with the variable ships[5] to hold all of the ships in the squadron.
My problem comes when adding ships to a squadron. Say I create a new squadron:
sq.squadron = New squadron
And now I try to add a ship to it:
s.ship = New ship sq\ships[0] = s
Which doesn't work. Any ideas?