Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.

Next: GetInstanceMember

Archie_UwU edited this page Nov 19, 2023 · 3 revisions

Accesses variables for a given instance / GameMaker struct.

Syntax

AurieStatus GetInstanceMember(
    [in]  RValue      Instance,
    [in]  const char* MemberName,
    [out] RValue*&    Member
);

Parameters

Instance

An object-typed RValue, containing the pointer to the instance the members of which will be enumerated. Given that RValues can be implicitely constructed from a CInstance*, it is possible for callers to pass a CInstance* directly. Note that this method operates only on CInstance* or on GameMaker structs, not on other data structures like DSMaps or DSLists. To access members of those data structures, callers should consider using GameMaker built-in functions, such as ds_map_find_value or ds_list_find_value.

MemberName

A pointer to an read-only buffer containing the name of the member which will be looked up. Note this lookup is case-sensitive.

Member

A reference to a pointer to an RValue. The RValue pointer retrieved from this routine may be invalidated at any time by the engine, and it is therefore not advised to hold onto pointers longer than absolutely necessary. The pointers retrieved by this routine point to not a copy, but the real variable, which means that access asynchronous from engine execution should be kept to a minimum. If the function fails, the address pointed-to by this variable is guaranteed to be preserved.

Return Value

The function returns AURIE_SUCCESS on success, otherwise returns a matching error code. If the internal runner function needed for accessing variables, the AURIE_MODULE_INTERNAL_ERROR status code is returned. If an invalid kind of RValue is specified, the function returns AURIE_INVALID_PARAMETER.

Quick Access

Documentation

Writeups

Clone this wiki locally