03-04-2003, 03:49 AM
Quote:types are not useful unless you are doing bitmap load.save stuff
Listen, just use a.hp and a.damage. You don't need type.
n = 100 'amount
DIM a.hp(n) as INTEGER, a.damage(n) as INTEGER
i = 56
a.hp(i) = a.hp(i) - a.damage(i)
But using types is better. If you have to pass all those values to a SUB, you only have to do
Code:
SUB dummy(a() AS mytype) ' this using types
instead of
Code:
SUB dummy(a.hp() AS INTEGER, a.damage() AS INTEGER ... ... ...)
TYPEs are one of the most useful things in QB.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i