Skip to content

setArray

MicroBlaster edited this page Nov 11, 2019 · 2 revisions

Purpose: Declares a static array.

Syntax: setArray var {dimensions...}

var: A variable to define as an array.

{dimensions...}: A series of values defining the size of the array.

Notes: When a static array is defined, all its values are automatically set to "0".

Static arrays perform MUCH faster than TWX Proxy's dynamic arrays. Use them whenever possible.

Example:

# load bust list
if ($BustFile <> "")
  fileExists $exists $BustFile

  if ($exists)
    setArray $BustList SECTORS
    setVar $i 1
    read $BustFile $bust $i
    while ($bust <> EOF)
      setVar $BustList[$bust] 1
      add $i 1
      read $BustFile $bust $i
    end
  end
end
Clone this wiki locally