QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Cobalt on February 15, 2022, 12:30:44 pm

Title: Why is my END IF tabbed(spaced) wrong?
Post by: Cobalt on February 15, 2022, 12:30:44 pm
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.

Code: QB64: [Select]
  1. TYPE Offset_data
  2.     X AS INTEGER
  3.     Y AS INTEGER
  4.     Xs AS _BYTE
  5.     Ys AS _BYTE
  6.  
  7. DIM SHARED Layer(32) AS LONG, Sprites(64) AS Offset_data
  8. DIM SHARED DungeonMaps(9, 7, 3) AS _BYTE
  9. Game.Scale = 1
  10.  
  11. SUB Draw_Mini_Map
  12.     FOR y%% = 0 TO 3: FOR x%% = 0 TO 7
  13.         IF DungeonMaps(Link.Dungeon, x%%, y%%) THEN
  14.             _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)
  15.             END IF
  16.     NEXT x%%, y%%
  17.     _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
  18.  

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Why is my END IF tabbed(spaced) wrong?
Post by: FellippeHeitor on February 15, 2022, 12:37:23 pm
Code: QB64: [Select]
  1. FOR y%% = 0 TO 3: FOR x%% = 0 TO 7

That line confused the indenter.
Title: Re: Why is my END IF tabbed(spaced) wrong?
Post by: Cobalt on February 15, 2022, 01:20:19 pm
That line confused the indenter.

  [ This attachment cannot be displayed inline in 'Print Page' view ]