MiniB3d is for Blitzmax .. and this code is for Blitzmax
Blitz3D is not compatible with this code.. is a different language.
i suggest you to learn something about arrays... is the most simple thing to use for this kind of usages.
you can also do something like your pseudocode .. using files...
for example create a file called "var+number" and write into it an integer.... this is a VERY SLOW solution... but works.. i use this for example to add a thumbnail to a certain item...
i have an item called 652567256 taken from an array (or a barcode reader... or a lot of other things..)... the software check if the file 652567256.jpg exist... if exist the image will be added to item description on main application

Oh, is it B3D now..? 
Yes you can have an array of objects in blitz3d.
this forum is
BlitzMax / BlitzMax NG i think is better to NOT publish B3d code on it.