declare types first thing in code and fucntions go after main code.
then you can dim a single varaible as a type or make an array of the type.
then you can dim a single varaible as a type or make an array of the type.
Code: (Select All)
Type equipment
equipmentname As String
equipmentdamage As Integer
equipmentdefense As Integer
equipmentdurability As Integer
End Type
type enemies
name as string
as integer damage, defense, durability
end type
dim bonespear as equipment ' do this first but you don't need the equipment name in type if you want to say bonespear.damage = 4
bonespear.equipmentname = "Bone spear" ' ---------- Will this work with TYPE ? yes
bonespear.equipmentdamage = 2
bonespear.equipmentdefense = 0
bonespear.equipmentdurability = 20
bonespearcount = 0
' either go by name and list.qualities or go by number and include the name in the type definition
dim foes(nEnemies) as enemies
foes(1).name = rabbit
foes(1).damage = ....
b = b + ...