Hi
Im trying to do like a lookup type thing for an inventory im making.
So far i've got:
dim got_items() as string
type UnitType
itemName$ as string
endtype
dim global_items(5) as UnitType
`this works but i want to loop it
item1 = val(got_items(0))
print global_items(item1).itemName$
-I have no problems putting items into either array, for ex:
global_items(0).itemName$ = "Zero item"
global_items(1).itemName$ = "Blunt Sword"
and: I am filling my array of got_items from a file ok.
But now i want to run through the outputs in a loop:
item1 = val(got_items(0))
print global_items(item1).itemName$
i've tried putting that in a loop and changing the values to the value of the for-next loop but it always errors out.
Does anyone know what im getting at?
Paul