• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

clearing array

Status
Not open for further replies.
Can you give me an example of the trigger because I'm confused a little

*edit* i feel stupid well anyway things that usually leak are
Location leaks
Special Effect leaks
Lightning leaks
Unit Group leaks
Player Group leaks

I dont believe a unit variable would leak unless it has a location in it
 
it does

u clear it like this (found out myself)

set udg_Dummy[bj_forLoopAIndex] = null

i spelled for big For before so it didnt work ;)

Yes. You would do this:

JASS:
local integer a
local integer b=(insert array size here)
loop
exitwhen a==b
set your_array[a]=null
set a=a+1
endloop

Of course, replacing pieces of this code when needed.
 
Oh, then just run a loop from 0 to the last slot in your array and set everything to null.
 
Wait, wait, when you say you wanted to clear an unit array, do you mean remove all the units in your array from the game?
 
Status
Not open for further replies.
Back
Top