This pos2grid script only works on islands that have been specifically added to the switch statement. You need to work out the Y-offset for the map you are using and add that to the list. You'll need to do that every time you want to use the script with a new island...
If you use
SPON Map (mission script or addon), you could change pos2grid to use SPON_Map_worldToGrid which will generate coordinates for absolutely
any position on
any map (including ones I've never tested it on, because it works out the y-offset for itself).
_this call SPON_Map_worldToGrid;
My function will also work on 6-digit co-ordinate maps, which is what all the ACE maps (and ACE versions of regular maps) use.
This is far from an ideal solution, but it is by far the easiest (especially for me
).