Everything else being spaced correctly why not this END IF? Both auto spacing and auto Indent is on. Can not recall ever seeing this before.
Pulled out just the code displaying the situation, and added the type and dims so there would be no errors stopping the auto format and it still happens. Through out the rest of the code all the other END IFs are spaced correctly, this is the only one.
Game.Scale = 1
IF DungeonMaps
(Link.Dungeon
, x%%
, y%%
) THEN _PUTIMAGE (16 + 8 * x%%
, 16 + 8 * y%%
)-STEP(Sprites
(39 + DungeonMaps
(Link.Dungeon
, x%%
, y%%
)).Xs
* Game.Scale
, Sprites
(39 + DungeonMaps
(Link.Dungeon
, x%%
, y%%
)).Ys
* Game.Scale
), Layer
(9), Layer
(1), (Sprites
(39 + DungeonMaps
(Link.Dungeon
, x%%
, y%%
)).X
, Sprites
(39 + DungeonMaps
(Link.Dungeon
, x%%
, y%%
)).Y
)-STEP(Sprites
(39 + DungeonMaps
(Link.Dungeon
, x%%
, y%%
)).Xs
* Game.Scale
, Sprites
(39 + DungeonMaps
(Link.Dungeon
, x%%
, y%%
)).Ys
* Game.Scale
) _PUTIMAGE (14 + Link.World_X
* 4, 16 + Link.World_Y
* 4)-STEP(2, 2), Layer
(9), Layer
(1), (618, 126)-STEP(2, 2) 'Map location beacon
[ You are not allowed to view this attachment ]