Author Topic: [minor bug] Incorrect autocomplete in switch-case  (Read 399 times)

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
In 3.4.0.16 (i.e. patch 4) :

Code: Adventure Game Studio
  1. AudioClip* ac;
  2. ac.
  3.  
When you do this and stop at the dot, you receive suggestions for AudioClip members, including "ID" which is not a member of AudioClip (only AudioChannel)
If you try to force it and type "ID", then of course the compiler complains about it.
« Last Edit: 22 Sep 2017, 14:07 by Monsieur OUXX »
 

Monsieur OUXX

  • Cavefish
  • Mittens Vassal
  • Mittens Half Initiate
    • I can help with proof reading
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
It's actually trickier than that :

It's the switch...case that doesn't manage well two variables with the same name:

Code: Adventure Game Studio
  1.     switch (...)
  2.     {
  3.         case  0: {
  4.             AudioChannel* ac; return ac.ID;
  5.             break;
  6.         }
  7.         case  1: {
  8.             AudioClip* ac; return ac.xxx //  <-- problem here
  9.             break;
  10.         }
  11.     }
  12.    
  13.  



I guess everyone can totally live with that. Super low priority.
« Last Edit: 25 Sep 2017, 10:13 by Monsieur OUXX »
 

Crimson Wizard

  • Local Moderator
  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: [minor bug] Incorrect autocomplete in switch-case
« Reply #2 on: 22 Sep 2017, 15:33 »
Need to also check 3.4.1, there were certain fixes to switch.