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

[Spell] Me Get error say my custom script gt problem

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2012
Messages
22
[Hey Guy please help me T-T
I try many time already still cant fix this problem...
It look my custom sciript got problem.
Here is 1 example from my custom script error...
Other error also almost same as this .

call PlaySoundBJ( gg_snd_Gray1Lance )
set udg_Point[20] = GetUnitLoc(udg_Unit[20])
set udg_Point[21] = GetSpellTargetLoc()

The second line when i save it say Attempt to index a non-array variable
 
Last edited:
Level 3
Joined
Mar 1, 2012
Messages
22
Timer003
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SpellOn[20] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TimerCount[20] Greater than 0
Then - Actions
Set TimerCount[20] = (TimerCount[20] - 1)
Set Real[21] = (Real[21] + 14.65)
Set Point[20] = (Position of Unit[21])
Set Point[21] = (Point[20] offset by 16.25 towards Real[20] degrees)
Destructible - Pick every destructible within 320.00 of Point[21] and do (Destructible - Kill (Picked destructible))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TimerCount[20] Less than 12
Then - Actions
Set Point[22] = (Point[21] offset by 220.00 towards Real[21] degrees)
Unit - Create 1 Dummy Gray 5 for (Owner of Unit[20]) at Point[22] facing (Random angle) degrees
Unit - Add a 1.60 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_Point[22])
Else - Actions
Unit - Move Unit[20] instantly to Point[21], facing Real[21] degrees
Unit - Move Unit[21] instantly to Point[21], facing Real[21] degrees
Unit - Create 1 Dummy Gray 3 for (Owner of Unit[20]) at Point[21] facing Real[21] degrees
Unit - Add a 0.55 second Generic expiration timer to (Last created unit)
Animation - Change (Last created unit)'s vertex coloring to (0.00%, 80.00%, 100.00%) with 40.00% transparency
Set UnitGroup[21] = (Units within 315.00 of Point[21] matching ((((Matching unit) belongs to an ally of (Owner of Unit[20])) Equal to False) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) is A structure) Equal to False))))
Unit Group - Pick every unit in UnitGroup[21] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in UnitGroup[20]) Equal to False
Then - Actions
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
Special Effect - Destroy (Last created special effect)
Unit - Cause Unit[20] to damage (Picked unit), dealing SpellDamage[20] damage of attack type Spells and damage type Normal
Unit Group - Add (Picked unit) to UnitGroup[20]
Else - Actions
Custom script: call DestroyGroup(udg_UnitGroup[21])
Custom script: call RemoveLocation(udg_Point[20])
Custom script: call RemoveLocation(udg_Point[21])
Else - Actions
Unit Group - Remove all units of UnitGroup[20] from UnitGroup[20]
Custom script: call DestroyGroup(udg_UnitGroup[20])
Camera - Stop swaying/shaking the camera for (Owner of Unit[20])
Unit - Add a 0.65 second Generic expiration timer to Unit[21]
Animation - Play Unit[20]'s stand animation
Set SpellDamage[20] = 0.00
Set Real[20] = 0.00
Set Unit[20] = No unit
Set Unit[21] = No unit
Set SpellOn[20] = False
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
SpellOn[20] Equal to False
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions


It same gt a error like Attempt to index a non-array variable
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
  • Timer003
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SpellOn[20] Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TimerCount[20] Greater than 0
            • Then - Actions
              • Set TimerCount[20] = (TimerCount[20] - 1)
              • Set Real[21] = (Real[21] + 14.65)
              • Set Point[20] = (Position of Unit[21])
              • Set Point[21] = (Point[20] offset by 16.25 towards Real[20] degrees)
              • Destructible - Pick every destructible within 320.00 of Point[21] and do (Destructible - Kill (Picked destructible))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TimerCount[20] Less than 12
                • Then - Actions
                  • Set Point[22] = (Point[21] offset by 220.00 towards Real[21] degrees)
                  • Unit - Create 1 Dummy Gray 5 for (Owner of Unit[20]) at Point[22] facing (Random angle) degrees
                  • Unit - Add a 1.60 second Generic expiration timer to (Last created unit)
                  • Custom script: call RemoveLocation(udg_Point[22])
                • Else - Actions
              • Unit - Move Unit[20] instantly to Point[21], facing Real[21] degrees
              • Unit - Move Unit[21] instantly to Point[21], facing Real[21] degrees
              • Unit - Create 1 Dummy Gray 3 for (Owner of Unit[20]) at Point[21] facing Real[21] degrees
              • Unit - Add a 0.55 second Generic expiration timer to (Last created unit)
              • Animation - Change (Last created unit)'s vertex coloring to (0.00%, 80.00%, 100.00%) with 40.00% transparency
              • Set UnitGroup[21] = (Units within 315.00 of Point[21] matching ((((Matching unit) belongs to an ally of (Owner of Unit[20])) Equal to False) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) is A structure) Equal to False))))
              • Unit Group - Pick every unit in UnitGroup[21] and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Picked unit) is in UnitGroup[20]) Equal to False
                    • Then - Actions
                      • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FrostWyrmMissile\FrostWyrmMissile.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit - Cause Unit[20] to damage (Picked unit), dealing SpellDamage[20] damage of attack type Spells and damage type Normal
                      • Unit Group - Add (Picked unit) to UnitGroup[20]
                    • Else - Actions
              • Custom script: call DestroyGroup(udg_UnitGroup[21])
              • Custom script: call RemoveLocation(udg_Point[20])
              • Custom script: call RemoveLocation(udg_Point[21])
            • Else - Actions
              • Unit Group - Remove all units of UnitGroup[20] from UnitGroup[20]
              • Custom script: call DestroyGroup(udg_UnitGroup[20])
              • Camera - Stop swaying/shaking the camera for (Owner of Unit[20])
              • Unit - Add a 0.65 second Generic expiration timer to Unit[21]
              • Animation - Play Unit[20]'s stand animation
              • Set SpellDamage[20] = 0.00
              • Set Real[20] = 0.00
              • Set Unit[20] = No unit
              • Set Unit[21] = No unit
              • Set SpellOn[20] = False
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • SpellOn[20] Equal to False
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
I cant see a problem there but im very used to Jass so someone who can read GUI like Defskull could check it
 
Status
Not open for further replies.
Top