Array in Type

Blitz3D Forums/Blitz3D Beginners Area/Array in Type

Josaih6/10(Posted 2009) [#1]
How do you add an array as a type field?


Ross C(Posted 2009) [#2]
Type car
   Field people_in_car$[10]
End type


To access:
c.car = new car
c\people_in_car[1] = "Jim"


Note the square brackets used. And also note you can only have one dimension in an array held within a type field. Oh, and you can't redimension the array either, so make it big enough to hold what you need.