• 🏆 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!

Critical Error

Status
Not open for further replies.
Level 3
Joined
May 26, 2014
Messages
41
Hello, in my map a critical error appears in few situations. The map is very popular on RoC, so this is a lot of trouble for our community. If anyone would be able to help, that would be great. I'm gonna describe the first type of critical in this thread not to confuse anyone.

This one happens when a player leaves the game (not certain one, just 1 of 12).It happens randomly without any clear reason. I figured that could be cos of the triggers, so i'm gonna post the triggers that may cause it.
  • defeat on leave
    • Events
    • Conditions
    • Actions
      • Set defeat[(Player number of (Triggering player))] = False
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set bool = True
          • For each (Integer B) from 1 to 12, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Integer A) Equal to (Integer B)
                      • defeat[(Integer B)] Equal to False
                      • And - All (Conditions) are true
                        • Conditions
                          • ((Player((Integer A))) is an ally of (Player((Integer B)))) Equal to True
                          • ((Player((Integer B))) is an ally of (Player((Integer A)))) Equal to True
                • Then - Actions
                • Else - Actions
                  • Set bool = False
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • bool Equal to True
            • Then - Actions
              • Game - Victory (Player((Integer A))) (Show dialogs, Show scores)
            • Else - Actions
Could be this one as well
  • defeat lose spawns
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Owner of (Matching unit)) Equal to (Triggering player))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Point-value of (Unit-type of (Picked unit))) Equal to 1
              • ((Picked unit) is A structure) Equal to True
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • Set tempReal = (Life of (Picked unit))
              • Set tempUnitType = (Unit-type of (Picked unit))
              • Set tempPoint = (Position of (Picked unit))
              • Unit - Remove (Picked unit) from the game
              • Unit - Create 1 tempUnitType for (Triggering player) at tempPoint facing Default building facing degrees
              • Unit - Set life of (Last created unit) to tempReal
            • Else - Actions
Ima look for more triggers that can cause it.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
I don't see anything that would cause crash in those two triggers.
There are two thing about the second trigger tho:
1) The trigger has no event, so I guess it is fired by some other trigger. In that case, doesn't (Triggering player) return null? Ain't it local like (Triggering unit)?
2) what is the point of said trigger? It basically picks specific type(s) of structure(s) -- depending how many of them have point value 1 -- of triggering player, save its life and position and then creates that very same structure for the same player at the same position with same health... what is the point of that?
 
Level 3
Joined
May 26, 2014
Messages
41
I don't see anything that would cause crash in those two triggers.
There are two thing about the second trigger tho:
1) The trigger has no event, so I guess it is fired by some other trigger. In that case, doesn't (Triggering player) return null? Ain't it local like (Triggering unit)?
2) what is the point of said trigger? It basically picks specific type(s) of structure(s) -- depending how many of them have point value 1 -- of triggering player, save its life and position and then creates that very same structure for the same player at the same position with same health... what is the point of that?

I wasn't the one making those trigger, it was the previous editor. The second trigger basically changes the base with spawns that players had to base without those spawns, so when player leaves the base still exists, but it doesnt spawn units anymore. I'll look for more triggers that could cause the critical, thanks. Oh and btw, could it be that this error doesnt have to do anything with triggers? It happens like instantly when some of the players leave, it doesnt happen systematically tho.
 
Status
Not open for further replies.
Top