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