• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

Reached maximum number of if/then/else's in GUI?

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2008
Messages
263
Okey so I have a trigger with a shitload of if/then/elses and when i add one more if then else it gets error when i save it. there is nothing wrong in it o_O
 
Level 6
Joined
Apr 23, 2008
Messages
263
It's 10k characters too long but its simply this all the way

  • else
    • set udg_Temp_Int_1 = ( udg_Temp_Int_1 + 1 )
    • if ( Trig_Trained_Units_Copy_Func004Func002C() ) then
      • if ( Trig_Trained_Units_Copy_Func004Func002Func003C() ) then
        • call SetUnitPositionLocFacingBJ( GetTrainedUnit(), GetRectCenter(gg_rct_Player_1_Unit_AB), 360.00 )
      • else
        • if ( Trig_Trained_Units_Copy_Func004Func002Func003Func001C() ) then
          • call SetUnitPositionLocFacingBJ( GetTrainedUnit(), GetRectCenter(gg_rct_Player_2_Unit_AB), 360.00 )
        • else
          • if ( Trig_Trained_Units_Copy_Func004Func002Func003Func001Func001C() ) then
            • call SetUnitPositionLocFacingBJ( GetTrainedUnit(), GetRectCenter(gg_rct_Player_3_Unit_AB), 180.00 )
          • else
            • if ( Trig_Trained_Units_Copy_Func004Func002Func003Func001Func001Func001C() ) then
              • call SetUnitPositionLocFacingBJ( GetTrainedUnit(), GetRectCenter(gg_rct_Player_4_Unit_AB), 180.00 )
            • else
            • endif
          • endif
        • endif
      • endif
    • else
uh sorry i dont know how to make it look good but it happens when i add another if/then/else to the last else
 
Level 6
Joined
Apr 23, 2008
Messages
263
Ummmm I just found the error I had placed one of the if/then/elses in the wrong place but I cant understand how that could interfere with adding one if/then/else in the end of the code, anyways problem solved i guess :p

If you have 10k characters for something like that, your code sucks.
Also, this is called Jass, not GUI.

actually its 90k, and i converted my GUI trigger to text then i wrapped trigger tags around it and it ended up that way xD
 
Status
Not open for further replies.
Top