Home mm2k6 Help Files Commands Script ENtities - Arrays
21 | 04 | 2018
Script ENtities - Arrays
Article Index
Script ENtities
Actions
Aliases
Arrays
Variables
Macros
Events
Gags
Tablist
Lists
Substitutes
Highlights
All Pages

Arrays

Format: /array {array name} {rows} {group name}
Format: /array {array name} {rows,columns} {group name}

Array lets you create both single and two dimensional arrays. If you are not
familiar with arrays, you can think of them like a spreadsheet. A single
dimensional array would have only 1 column, and as many rows as you specify.
A two dimensional array would have both rows and columns. Each cell in the
array would be accessed by giving a row and a column number. In the case of
single dimensional array, only a row number is needed. Each cell can hold data
like a variable.

  • {array name} The name of the array. 
  • (rows} When creating a single dimensional array, the number of rows. The number must be between 1 and 100. 
  • {{rows,columns} For creating a two dimensional array. The numbers must be between 1 and 100. 
  • {group name} This is optional, see the user guide for help with groups.

/array {Targets} {3}
This would create an array called Targets. The array can hold up to 3 items.

/array {Grid} {5,5}
This creats a two dimensional array, or a grid. The grid has 5 rows, with 5
columns in each row.

Assign

Format: /assign {array name} {row} {value}
Format: /assign {array name} {row,column} {value}

Assign sets the value of a cell in an array.

  • {array name} The name of the array.
  • {row} For assigning cells in a single dimensional array. The number must be between 1 and the number of rows you created the array with. 
  • {rows,columns} For assigning cells in a two dimensional array. The numbers must be between 1 and the number of rows and columns you created the array with. 
  •  {value} The text or number you want to assign to the cell.

/assign {Targets} {1} {Soth}
This assigns the first cell in the array to hold the text "Soth".

/assign {Grid} {2,4} {16}
This assigns row 2, column 4 of the grid with a value of 16.

ArrayCopy

Format: /arraycopy {ExistingArrayName}{ArrayCopyName}{ArrayCopyGroup}
Format: /arraycopy {ExistingArrayName}{ArrayCopyName}

New in Version 4.1
Makes a new array which is an exact copy of an existing array but with a new name and group.