-
Notifications
You must be signed in to change notification settings - Fork 13
Next: GetArrayEntry
Retrieves a pointer to an element from within a GameMaker array.
AurieStatus GetArrayEntry(
[in] RValue& Value,
[in] size_t ArrayIndex,
[out] RValue*& IndexedValue
);
A non-const reference to a variable of type VALUE_ARRAY
. You can get this reference to an existing variable by calling GetInstanceMember on an existing instance, or by creating a new RValue
on the stack.
The index of the element to retrieve within the array. Valid values range from 0
up to array_length(Value) - 1
.
A reference to a pointer-sized buffer, into which the pointer to the variable at index ArrayIndex
will be written.
If the function fails, the value stored within this buffer is guaranteed to remain unchanged.
The function returns AURIE_SUCCESS
on success, otherwise returns a matching error code. If the information needed for looking up array elements isn't available, the AURIE_MODULE_INTERNAL_ERROR
status code is returned. The function returns AURIE_INVALID_PARAMETER
if the lookup failed due to ArrayIndex
exceeding the size of the array, or if the Value
argument isn't an array. If the function failed to determine the array size, AURIE_EXTERNAL_ERROR
is returned.