Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a problem...
#3
Quote:types are not useful unless you are doing bitmap load.save stuff Smile

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
Reply


Messages In This Thread
a problem... - by Placeborick - 03-04-2003, 02:18 AM
a problem... - by Agamemnus - 03-04-2003, 02:32 AM
a problem... - by na_th_an - 03-04-2003, 03:49 AM
a problem... - by Agamemnus - 03-04-2003, 06:20 AM
a problem... - by toonski84 - 03-04-2003, 08:36 AM
a problem... - by Neo - 03-04-2003, 01:38 PM
a problem... - by Zap - 03-06-2003, 07:43 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)