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

[Trigger] Syntax Error

Status
Not open for further replies.
Level 3
Joined
Nov 22, 2012
Messages
50
Hello, so I tried to copy 1 spell from other map(map creator allowed me to do this), but something wrong.. getting syntax error and game doesn't start, just frozen throne main screen opens.

223796-albums6014-picture64124.jpg


Spell Night Dart
  • Night Dart
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Night Dart
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AM_Skip Equal to 0
        • Then - Actions
          • Trigger - Turn on Missile Loop <gen>
        • Else - Actions
      • Set HeroAngle[(Player number of (Owner of (Triggering unit)))] = (Facing of (Triggering unit))
      • Set HeroPos[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Set Energy[(Player number of (Owner of (Triggering unit)))] = (Mana of Hero[(Player number of (Owner of (Triggering unit)))])
      • Set RangedPower[(Player number of (Owner of (Triggering unit)))] = (Agility of Hero[(Player number of (Owner of (Triggering unit)))] (Include bonuses))
      • Set AbilityDamage[(Player number of (Owner of (Triggering unit)))] = (Energy[(Player number of (Owner of (Triggering unit)))] + (Real(RangedPower[(Player number of (Owner of (Triggering unit)))])))
      • Set AM_Skip = (AM_Skip + 1)
      • Set AM_Times = (AM_Times + 1)
      • Set AM_Off[AM_Times] = True
      • Set AM_Name[AM_Times] = (Name of (Ability being cast))
      • Set AM_Hero[AM_Times] = (Triggering unit)
      • Set AM_Point[0] = (Position of (Triggering unit))
      • Set AM_Point[1] = (Target point of ability being cast)
      • Set AM_Angle[AM_Times] = (Angle from AM_Point[0] to AM_Point[1])
      • Set AM_Dmg[AM_Times] = AbilityDamage[(Player number of (Owner of (Triggering unit)))]
      • Set AM_AoE[AM_Times] = 70.00
      • Set AM_Collision[AM_Times] = 70.00
      • Unit - Create 1 Missile Counter for (Owner of AM_Hero[AM_Times]) at AM_Point[0] facing AM_Angle[AM_Times] degrees
      • Set AM_Missile[AM_Times] = (Last created unit)
      • Special Effect - Create a special effect attached to the chest of (Last created unit) using Abilities\Spells\Other\BlackArrow\BlackArrowMissile.mdl
      • Set AM_FX[AM_Times] = (Last created special effect)
      • Animation - Change AM_Missile[AM_Times] flying height to 30.00 at 0.00
      • Set AM_Speed[AM_Times] = 27.00
      • Set AM_Distance[AM_Times] = 600.00
      • Custom script: call RemoveLocation ( udg_AM_Point[0] )
      • Custom script: call RemoveLocation ( udg_AM_Point[1] )
      • Custom script: call RemoveLocation ( udg_HeroPos[(GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())))])
And Missile Loop
  • Missile Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer AM) from 1 to AM_Times, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AM_Off[AM] Equal to True
            • Then - Actions
              • Set AM_Point[2] = (Position of AM_Missile[AM])
              • Set AM_Point[3] = (AM_Point[2] offset by AM_Speed[AM] towards AM_Angle[AM] degrees)
              • Custom script: set udg_AM_X[udg_AM] = GetLocationX(udg_AM_Point[3])
              • Custom script: set udg_AM_Y[udg_AM] = GetLocationY(udg_AM_Point[3])
              • Custom script: call SetUnitX(udg_AM_Missile[udg_AM], udg_AM_X[udg_AM])
              • Custom script: call SetUnitY(udg_AM_Missile[udg_AM], udg_AM_Y[udg_AM])
              • Set AM_Distance[AM] = (AM_Distance[AM] - AM_Speed[AM])
              • Set AM_Group = (Units within AM_Collision[AM] of AM_Point[3] matching ((((Matching unit) belongs to an enemy of (Owner of AM_Missile[AM])) Equal to True) and (((Matching unit) is alive) Equal to True)))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RangedWeapon[(Player number of (Owner of AM_Hero[AM]))] Equal to
                • Then - Actions
                  • Set AM_BonusDamage[AM] = (AM_BonusDamage[AM] + 1.66)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in AM_Group) Greater than 0
                • Then - Actions
                  • Custom script: call DestroyGroup ( udg_AM_Group )
                  • Set AM_Distance[AM] = 0.00
                  • Set AM_Dmg[AM] = (AM_Dmg[AM] + AM_BonusDamage[AM])
                  • Set AM_Group = (Units within AM_AoE[AM] of AM_Point[3] matching ((((Matching unit) belongs to an enemy of (Owner of AM_Missile[AM])) Equal to True) and (((Matching unit) is alive) Equal to True)))
                  • Unit Group - Pick every unit in AM_Group and do (Actions)
                    • Loop - Actions
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\HydraliskImpact\HydraliskImpact.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • AM_Name[AM] Equal to (Name of Night Dart )
                        • Then - Actions
                          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - ((Mana of (Picked unit)) / 20.00))
                          • Unit - Set life of AM_Hero[AM] to ((Life of AM_Hero[AM]) + ((Mana of (Picked unit)) / 20.00))
                        • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • AM_Distance[AM] Less than or equal to 0.00
                      • (Terrain pathing at AM_Point[3] of type Flyability is off) Equal to True
                • Then - Actions
                  • Special Effect - Destroy AM_FX[AM]
                  • Unit - Kill AM_Missile[AM]
                  • Set AM_BonusDamage[AM] = 0.00
                  • Set AM_Skip = (AM_Skip - 1)
                  • Set AM_Count = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Siege Engine) and (((Matching unit) is alive) Equal to True)))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Number of units in AM_Count) Equal to 0
                    • Then - Actions
                      • Set AM_Off[AM] = False
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • AM_Skip Equal to 0
                        • Then - Actions
                          • Set AM_Times = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                  • Custom script: call DestroyGroup(udg_AM_Count)
                • Else - Actions
              • Custom script: call RemoveLocation ( udg_AM_Point[2] )
              • Custom script: call RemoveLocation ( udg_AM_Point[3] )
              • Custom script: call DestroyGroup ( udg_AM_Group )
            • Else - Actions
What's wrong ? :D
 
Level 3
Joined
Nov 22, 2012
Messages
50
Already did that, when I'll be at home, I'll try to create those variables =).
 
Level 9
Joined
Apr 30, 2010
Messages
324
or , may be you didn't disable the Reinventing the craft on the editor.. i had this problem before.. my trigger is clean, but idk, 25000 compile errors for no reason.. --' idk.. but this tragedy make my map fatal and need to be transfer into a new map... so, if u forgot Disable the RTC, pls do it :)
 
Level 3
Joined
Nov 22, 2012
Messages
50
Yes I did, but something doesn't work it doesn't damage enemys. :D Everything so confused! :D
 
Status
Not open for further replies.
Top