Main Connecting Starting



help array

array pushstr <object> <array> <value>

Pushes string value "value" onto the end of specified array on the target object. If the array does not exist, it will be created.

array pushint <object> <array> <value>

Pushes int value "value" onto the end of specified array on the target object. If the array does not exist, it will be created. Float values will be cast to integers.

array unset <object> <array> <index>

Removes array entry at specified index from target object.

array remove <object> <array> <value>

Removes all array entries with matching value from target object.

array swap <object> <array> <index 1> <index 2>

Swaps the contents of two entries in the array.

In all cases, The array "count" attribute is kept up to date, and if entries are removed from the middle of the array all values above that entry are shuffled down into place. When the last element of an array is removed, its "count" attribute is unset, too.

See also:
set, unset, chstr, chint, delete, stat