No multi-dimentional Blitz Arrays!
BlitzPlus Forums/BlitzPlus Programming/No multi-dimentional Blitz Arrays!| 
 | ||
| Just found out this won't compile: Type LevelStruct Field Grid[MAX_LEVEL_WIDTH,MAX_LEVEL_HEIGHT] End Type bummer, gonna have to use a * sign instead of comma and then do my Y coord * MAX_LEVEL_WIDTH each time, sigh. | 
| 
 | ||
| Can you do it like C++ where you do grid[asdf][fdsa]? | 
| 
 | ||
| If you are using BlitzPlus I think you need to use () instead of []. Try 
Type LevelStruct
    Field Grid(MAX_LEVEL_WIDTH, MAX_LEVEL_HEIGHT)
End Type
Don't have access to B+ right now so I can't test it. | 
| 
 | ||
| Sushimasta, your example doesn't work, it gives me this error: "Expecting 'Field' or 'End Type'" | 
| 
 | ||
| Yeah you can only use 1 dimensional Blitz Arrays (i.e. using square brackets not round ones) in fields.  That's pretty much my problem.  It wasn't too bad in the end as everytime I stored a value in it I did Grid(y*width+x) which worked fine. | 
| 
 | ||
| Oh I didn't know you could only use 1 dim. arrays as fields. I just assumed it would be possible as it is in most languages. |