Ar Erase

From the Oblivion ConstructionSet Wiki
Revision as of 11:15, 18 September 2010 by imported>QQuix (Organizing the Array Functions category list)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(numRemoved:short) ar_Erase target:array index:arrayIndex 
(numRemoved:short) ar_Erase target:array range:slice

Erases elements from an array. You may provide a single element, in which case only that element will be erased and only if it is present. Or, you may provide a range in slice notation. Any elements greater than or equal to the lower bound and less than or equal to the upper bound of the range will be erased. If the array is of type Array, elements above the erased elements will be shifted down. Returns the number of elements removed.