I just checked the referring searches list & found that someone was looking for how to get an array’s length in IAS. Well, here’s my 5 minutes worth of notes on arrays. All IAS arrays are one based (indexes start at one). You can refer to a single index (VariableName[#]) or the entire array (VariableName). I’m breaking the rest of the information down into two parts: UDA arrays & local script variable arrays.
I’m starting with a simple integer array for these examples (see below). In the script below, I show examples of getting an array’s size, iterating the array, a fast way of clearing out an array, and a way to resize an array on the fly. UDA arrays cannot be extended, but I have seen them take on a bad quality when coping extended values into them. The only way I have found to get them back to a good quality is to use the SetGood(…) function.
Local Variable Arrays
Using local variable arrays is the same as using UDA arrays with a few exceptions. A local variable array cannot be resized by writing to its Length property. The only way I have found of changing its size on the fly is by copying a UDA array to it. This is shown in the picture below.