Brain Stumper

Blitz3D Forums/Blitz3D Programming/Brain Stumper

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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:
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?