Author Topic: Why is my END IF tabbed(spaced) wrong?  (Read 2823 times)

0 Members and 1 Guest are viewing this topic.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Why is my END IF tabbed(spaced) wrong?
« 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.  

  [ You are not allowed to view this attachment ]  
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Why is my END IF tabbed(spaced) wrong?
« Reply #1 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.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Why is my END IF tabbed(spaced) wrong?
« Reply #2 on: February 15, 2022, 01:20:19 pm »
That line confused the indenter.

  [ You are not allowed to view this attachment ]  
Granted after becoming radioactive I only have a half-life!