world.ArraySet
Sets the value of an array item
Prototype
long ArraySet(BSTR Name, BSTR Key, BSTR Value);
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
Related topic
See also
| Function | Description |
|---|---|
| ArrayClear | Clears an array |
| ArrayCreate | Creates an array |
| ArrayDeleteKey | Deletes a key/value pair from an array |
| ArrayGet | Gets the value of an array item |
| ArrayKeyExists | Tests to see if the specified array key exists |
| ArrayListKeys | Gets the list of all the keys in an array |