PDA

View Full Version : How do you delete all elements in an Array?


darkshark
06-16-2011, 07:44 PM
I simply want to clear out everything in an array.

There are thousands of things that get put into this array, so using deleteitem 1,2,3,4,5......is just not going to happen. Any ideas?

PiXeL_MoNKeY
06-16-2011, 07:53 PM
Set the array.count value to 0 or #().array.count = 100
#(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, ...)
array.count = 0
#()
array = #()
#()
-Eric

darkshark
06-16-2011, 08:15 PM
Woooooowwwwwww I'm dumb lol. Shows how much I know about arrays. Thanks a ton though Eric!

CGTalk Moderation
06-16-2011, 08:15 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.