• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Index missing for array variable

Status
Not open for further replies.
Level 4
Joined
Jun 16, 2009
Messages
48
I imported a spell from the hive's spell resource,the spell works in the test map,but after i try to save it in my map,i get multiple errors,i dont know why.

Here is the "error",and all functions that have this variable,get an index missing for array variable udg_ID

  • Soul Gathering Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to SG_Spell
    • Actions
      • Set TEMP_UNIT = (Triggering unit)
      • Set TEMP_LOC = (Target point of ability being cast)
      • -------- Create the dummy --------
      • Unit - Create 1 SG_DummyType for (Owner of TEMP_UNIT) at TEMP_LOC facing Default building facing degrees
      • Set ID = (Custom value of (Last created unit)) <<<<< HEREEEE
      • Unit Group - Add (Last created unit) to SG_MainDummyGroup
      • -------- Add expiration timer to dummy - Charged Time --------
      • Unit - Add a (2.00 + (1.00 x (Real((Level of SG_Spell for TEMP_UNIT))))) second Generic expiration timer to (Last created unit)
      • Unit - Change color of (Last created unit) to Black
      • -------- Starting Scale of the Dummy --------
      • Set SG_Scale[ID] = 50.00
      • -------- Starting Scale of the AoE --------
      • Set SG_AoE[ID] = 80.00
      • -------- Set Damage per 0.04 Second --------
      • Set SG_Dps[ID] = (0.80 x (Real((Level of SG_Spell for TEMP_UNIT))))
      • -------- Set damage at the end of the skill --------
      • Set SG_Damage[ID] = (50.00 x (Real((Level of SG_Spell for TEMP_UNIT))))
      • Custom script: call RemoveLocation(udg_TEMP_LOC)
      • Trigger - Turn on Soul Gathering Loop <gen>
JASS:
    set udg_ID=GetUnitUserData(GetLastCreatedUnit())

Please help.
I imported the spell with all requirements.
 
udg_ID became an array type variable so it needs an index... if you're sure that it isn't an array, just go to vairable manager and find the ID variable and remove array classification...

The only possible reason I see why it changed is that you already have an array variable named ID in your map that is used by other scripts...
 
Status
Not open for further replies.
Top