• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Crash] Fatal Errors?

Status
Not open for further replies.
Level 8
Joined
Jul 25, 2009
Messages
194
My map has had fatal errors for a while now, but I noticed that they seem to happen whenever the code below is running.
Does anyone know if it could be a problem with the code?

  • Events
    • Time - Every 2.51 seconds of game time
  • Conditions
    • Duel_Boolean Equal to True
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
      • Then - Actions
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units in Duel area <gen>) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is alive) Equal to True
                • ((Owner of (Picked unit)) is in human_team) Equal to True
              • Then - Actions
                • Unit Group - Add (Picked unit) to human_unit_group
              • Else - Actions
                • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • EM_MODE Equal to False
          • Then - Actions
            • Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String((Number of units in human_unit_group)))
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in human_unit_group) Equal to 0
          • Then - Actions
            • Game - Display to (All players) for 30.00 seconds the text: The Undead have won...
            • Set DUEL_NEUTRAL = True
            • Trigger - Turn off Send in the neutrals <gen>
            • Player Group - Pick every player in PG1 and do (Actions)
              • Loop - Actions
                • Player - Add 100 to (Picked player) Current gold
            • Player Group - Pick every player in PG2 and do (Actions)
              • Loop - Actions
                • Player - Add 40 to (Picked player) Current gold
            • Unit - Create 1 Duel End Timer for Neutral Passive at (Center of human tower <gen>) facing Default building facing degrees
            • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
            • Trigger - Turn off (This trigger)
          • Else - Actions
            • Unit Group - Pick every unit in human_unit_group and do (Actions)
              • Loop - Actions
                • Unit Group - Remove (Picked unit) from human_unit_group
      • Else - Actions
        • Do nothing
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
      • Then - Actions
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units in Duel area <gen>) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is alive) Equal to True
                • ((Owner of (Picked unit)) is in undead_team) Equal to True
              • Then - Actions
                • Unit Group - Add (Picked unit) to undead_unit_group
              • Else - Actions
                • Do nothing
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • EM_MODE Equal to False
          • Then - Actions
            • Multiboard - Set the text for (Last created multiboard) item in column 2, row 2 to (String((Number of units in undead_unit_group)))
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in undead_unit_group) Equal to 0
          • Then - Actions
            • Game - Display to (All players) for 30.00 seconds the text: The Humans have won...
            • Set DUEL_NEUTRAL = True
            • Trigger - Turn off Send in the neutrals <gen>
            • Player Group - Pick every player in PG1 and do (Actions)
              • Loop - Actions
                • Player - Add 40 to (Picked player) Current gold
            • Player Group - Pick every player in PG2 and do (Actions)
              • Loop - Actions
                • Player - Add 100 to (Picked player) Current gold
            • Unit - Create 1 Duel End Timer for Neutral Passive at (Center of human tower <gen>) facing Default building facing degrees
            • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
            • Trigger - Turn off (This trigger)
          • Else - Actions
            • Unit Group - Pick every unit in undead_unit_group and do (Actions)
              • Loop - Actions
                • Unit Group - Remove (Picked unit) from undead_unit_group
      • Else - Actions
        • Do nothing
 
Level 25
Joined
May 11, 2007
Messages
4,651
The first if then else,
has no condition for the if case.

Instead of Unit Group - Pick every unit in undead_unit_group and do (Actions)
Loop - Actions
Unit Group - Remove (Picked unit) from undead_unit_group

Just use
Unit Group - Clear undead_unit_group

And remove the do nothing. They don't do.. anything.
 
Status
Not open for further replies.
Top