How do I check multiple items in a TYPE

Blitz3D Forums/Blitz3D Beginners Area/How do I check multiple items in a TYPE

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.

Say I have..

TYPE fish
 Field color
 end type

goldfish.fish = new fish
shark.fish = new fish
nemo.fish = new fish

goldfish\color = orange
nemo\color = orange
shark\color = grey


Now, say I have several hundred fish. How can I go through and find which are orange without checking each one by name (eg, if nemo\fish=orange then)? TYPE won't let me use FISH(1).FISH = New Fish so I can't do a loop to check them all.

Basically, I'm trying to write a function which creates new items on the fly (up to a maximum of 99), and assigns them each an ID number. Hence, I don't want to have to know the names of, and do a manual check on each one. The EACH command doesn't seem to apply here, and if it does, maybe I'm mis-reading the manual? :)

Any help would be appreciated!

+BlackD