slices :(
BlitzMax Forums/BlitzMax Beginners Area/slices :(
| ||
..are useless .. :( You can't use a variable to resize/manage them. What's the use of nondynamic slicing then? I made a nice map-object for one 2d layer (typical for zelda'ish maps).. but since I want more than one layer (but I don't know how many!) I want to put each maplayer in an arraymember.. naturally I need to stretch that array when I add a layer.. hence my idea to use something like: local layercount:byte=2 local maplayer:TMap[layercount] ' add a map layercount:+1 maplayer[..layercount] something like this.. (haven't tested this code, but I guess the idea is clear) shame .. doesn't work. Tried to store an instance of my map-object as int in a bank, with those Handle commands .. somehow I couldn't get it to work. I don't like lists for all this.. no option I figure, unless someone explains me how to directly access a listmember of MY choice, without browsing through the whole thing with eachin etc. |
| ||
..are useless .. :( Well you're wrong, but you're entitled to your opinion. shame .. doesn't work. Yes it does. You just need to create a TMap (poorly chosen name BTW, you should go with one that isn't taken) instance to put in the new position. Tried to store an instance of my map-object as int in a bank, with those Handle commands .. somehow I couldn't get it to work. Don't feel too bad - that's a bad idea anyway. |
| ||
this works: |
| ||
aargh, ok .. bug was mine.. ^_^ TMap was just an example-name here, didn't bother come up with a more official name here.. no worries. |