world.ArrayKeyExists

MUSHclient script function (Method) — introduced in version 3.46

Tests to see if the specified array key exists

Prototype

boolean ArrayKeyExists(BSTR Name, BSTR Key);

Data type meanings

Description

This returns TRUE (1) if the specified key in the specified array exists, and FALSE (0) if it does not.

VBscript example

Note ArrayKeyExists ("spells", "farsight")

Lua example

Note (ArrayKeyExists ("spells", "farsight"))

Return value

TRUE if the key in the array exists.
FALSE if it does not exist.

Note: TRUE is a non-zero value, FALSE is the value 0.

Related topic

Arrays

See also

FunctionDescription
ArrayCountReturns the number of arrays
ArrayCreateCreates an array
ArrayDeleteDeletes an array
ArrayListAllGets the list of arrays
ArrayListKeysGets the list of all the keys in an array