Restored from previous forum. Originally posted by JohnDeHope3.
I want to hold a map in a structure, so I need a 2-dimension array like this...
Structure Terrain
Name.s
Walkable.b
CharacterSymbol.s
EndStructure
Structure Map
Name.s
Cells.Terrain[10,10]
EndStructure
This would give my map a 10x10 array of terrain cells. But it seems I cannot have a static, multidimensioned array in a structure.
My beef is that since a structure's size is fixed, and a static array's size is fixed, why can't I have a two-dimensional array of structures?
Multi-Dimension Arrays In Structures
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Kale.
change to:
--Kale
New to PureBasic and falling in Love!
change to:
Code: Select all
Structure Terrain
Name.s
Walkable.b
CharacterSymbol.s
EndStructure
Structure Map
Name.s
Dim Cells.Terrain(10,10)
EndStructure
New to PureBasic and falling in Love!
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by freak.
Kale, what you wrote is just wrong.
Did you ever test this?
There is only one solution. See here:
viewtopic.php?t=4512
Timo
Kale, what you wrote is just wrong.
Did you ever test this?
There is only one solution. See here:
viewtopic.php?t=4512
Timo
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm