• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

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