08-30-2003, 02:00 AM
I made a map editor for my engine that you can cutomize the grid width and height of the map to make it versatile. In my game, I have a subroutine that loads the info from the map and allocates the map array according to the width and height of the map. But here's the problem, when I use redim in that subroutine, it won't let me allocate a map that's over (32, 29). When it redims a map with (32, 30), it crashes. Everything seems correct. At the begining I use:
'$dynamic
redim shared Map(1 to 1, 1 to 1) as integer
and in the MapInit subroutine, when it loads the info from the map file, I have:
redim Map(1 to GridXMax, 1 to GridYMax)
Everything seems correct. Like I said, it works if it isn't higher that (32,29) ???
I noticed that if I use Dim instead and don't make it dynamic it works fine for any map size, but the map always have to be the same size. Does anybody know anything about this? Thanks
'$dynamic
redim shared Map(1 to 1, 1 to 1) as integer
and in the MapInit subroutine, when it loads the info from the map file, I have:
redim Map(1 to GridXMax, 1 to GridYMax)
Everything seems correct. Like I said, it works if it isn't higher that (32,29) ???
I noticed that if I use Dim instead and don't make it dynamic it works fine for any map size, but the map always have to be the same size. Does anybody know anything about this? Thanks
strosmash :
www.geocities.com/juice801980/astro.zip
T.A.N.K :
www.geocities.com/juice801980/tank.zip
(right click, save-as...)
www.geocities.com/juice801980/astro.zip
T.A.N.K :
www.geocities.com/juice801980/tank.zip
(right click, save-as...)