Mini Map Generator

by Zaltron
Generates minimaps
To load a map you must first generate 'MiniMaps.dmi' which you will
be prompted to do when you run a minimap function. You
only have to generate the graphics for your minimaps once. If you
update your map files you will want to delete 'MiniMaps.dmi' and
generate a new 'MiniMaps.dmi'.

//If you're going to use loc = locate(#, #, #) anywhere you need to put
//updatePointerLocation() after it if the atom/movable being relocated
//has a pointer.

//map_controller: The name of the Map control/element in the interface
// want to load the map to.
//name: The name of the icon_state/map you wish to load.
// It will have a value of 1-#? as text
// 1 being the map for the first zlevel 2 being the 2nd
// ect...
mob/proc/showMap(map_controller, name = "")

//name: The map(1-#?) you wish to unload.
mob/proc/hideMap(name = "")

mapToggle() allows you to turn on and off specific pointers on a minimap.

Examples:[mapToggle("[zlevel/minimap].[category]", TRUE/FALSE/NULL)]
mapToggle("1.All", TRUE)//Makes everything on minimap1 visible.
mapToggle("1.Red", TRUE)//Makes everything that is in the Red category of minimap 1 visible.
mapToggle("All", TRUE)//Makes everything visible.
mapToggle("All.Red", TRUE)//Makes everything that is in the Red category of all minimaps visible.
mapToggle("All")//Makes everything on all minimap that is invisible visible and everything that's visible invisible.

//x: x location pressed
//y: y location pressed
//z: z location pressed
//a: atom at location pressed
minimap_pointer/Pressed(x, y, z, atom/a)

//x: x location pressed
//y: y location pressed
//z: z location pressed
minimap/Pressed(x, y, z)
Just a quick comment or suggestion really, It would be nice if you made the mini map movable, so it doesn't obscure a portion of the screen. Or perhaps add some kind of interface element so that it is near the map but not on the map. Other wise, it is a wonderful library! And I can't wait for the future update.
How is it now? You can add a Map Control along side the default map and have the minimap appear inside.
Nicely done. =]
Whenever I try to use this, I get a bad index error on line 303 in I tried it in three different projects and I get the same result every time. Any suggestions?

Edit: Seems like the problem was that I changed the directory it searched. I suppose the problem is that it needs the PNG files from a different folder, but I get "bad text or out of bounds" on line 215 if I include the PNG files.

Edit 2: I fixed the problem by adding if(length(i)>length(fileType)+1) to line 215, but I'm still getting the bad index error.
Have you tried re-installing BYOND? Also, what version are you using?
I don't see what reinstalling BYOND would help, but I can try if you really think that's the issue. See this post for more info.
I didn't notice that you replied. Did you ever get the problem resolved? I tried looking at the post you linked but it redirected me to the forums front page.
I'm getting the same issue on line 303 "bad index". I removed all PNG files from my project and it still does it.

Is there a chance this is caused by icons with large dimensions?