Array Functions⚓︎
Warning
The MWSE-mwscript API is deprecated. The documentation found here is for legacy purposes only. None of the following functions can be used directly from Lua.
xClearArray⚓︎
Parameters:
longarrayId: The id of the array to clear.
Returned:
longresult:1if the array was successfully cleared.
This function clears an array, removing any values from it.
xCreateArray⚓︎
Parameters:
- None
Returned:
longarrayId: The id of the array that was created.
This function creates an empty array, and returns the id of it.
xGetArraySize⚓︎
Parameters:
longarrayId: The id of the array.
Returned:
longsize: The number of elements in the array.
This function determines the size of an array.
xGetArrayValue⚓︎
Parameters:
longarrayId: The id of the array to get a value from.longindex: The index in the array to fetch.
Returned:
longvalue: The value in the array at the given index.
This function retrieves a value in an array, identified by arrayId and at index.
xSetArrayValue⚓︎
Parameters:
longarrayId: The id of the array to get a value from.longindex: The index in the array to fetch.longvalue: The value to set into the array.
Returned:
shortstatus:1if the value was set, otherwise 0.
This function retrieves sets a value in an array, identified by arrayId and at index.