Is there any problem with arrays like this[][]?
BlitzMax Forums/BlitzMax Programming/Is there any problem with arrays like this[][]?| 
 | ||
| I am getting a strange memory overwrite error somewhere.  Could it be caused by declaring resizable arrays like this?: Field instancematrix:Float[][MAXVEGETATIONLAYERS] Field billboardcenter:TVec3[MAXVEGETATIONLAYERS] | 
| 
 | ||
| If it was anyone else asking this, I would've said no. | 
| 
 | ||
| I don't recall having problems with it. Question is, what value does MAXVEGETATIONLAYERS contain? | 
| 
 | ||
| It's a constant integer. | 
| 
 | ||
| Yes I get that, what value does it contain. | 
| 
 | ||
| 32 | 
| 
 | ||
| Multi-dimensional arrays aren't good. (I'm not going to back that up with any reasons other than perhaps... I told you so). | 
| 
 | ||
|  Multi-dimensional arrays aren't good.  Can you elaborate on that? I tracked the bug down to an error in Newton physics. | 
| 
 | ||
|  Multi-dimensional arrays aren't good.  But isn't JoshK creating a unidimensional array of unidimensional arrays? | 
| 
 | ||
| Above code shouldn't do any overwrite but the first array also is not really declared / correctly initialized at that point. its just a reference to "nothing" at that time so not much to overwrite. |