world.ArraySet

MUSHclient script function (Method) — introduced in version 3.46

Sets the value of an array item

Prototype

long ArraySet(BSTR Name, BSTR Key, BSTR Value);

Data type meanings

Description

This sets the value for a specified key, for a specified array.

VBscript example

ArraySet "spells", "dragonskin", "45"

Lua example

ArraySet ("spells", "dragonskin", "45")

Return value

eBadArrayName: Name cannot be empty
eBadKeyName: Key cannot be empty
eArrayDoesNotExist: Array does not exist
eSetReplacingExistingValue: Value set, however it overwrote an existing value

eOK: Set OK

Return code meanings

Related topic

Arrays

See also

FunctionDescription
ArrayClearClears an array
ArrayCreateCreates an array
ArrayDeleteKeyDeletes a key/value pair from an array
ArrayGetGets the value of an array item
ArrayKeyExistsTests to see if the specified array key exists
ArrayListKeysGets the list of all the keys in an array