Next: GetNamedRoutineIndex - AurieFramework/YYToolkit GitHub Wiki
Looks up a named object in various runner data structures.
Syntax
AurieStatus GetNamedRoutineIndex(
[in] const char* FunctionName,
[out] int* FunctionIndex
);
Parameters
FunctionName
A pointer to the buffer containing the name of the object to look up. This parameter can refer to either a GameMaker built-in function, a GameMaker script, or a function name provided by extensions.
[!NOTE] This function is case-sensitive, meaning a script named
scr_my_Script
is different from a script namedscr_my_script
. This behavior is consistent for all types of lookups.
FunctionIndex
A pointer to an 32-bit integer, which receives the index of the object being looked up. This pointer is only written to if and when the function succeeds. If the function fails, the contents of the pointed-to variable are not guaranteed to remain untouched, particularly if the function returns AURIE_OBJECT_NOT_FOUND
.
The value written to this buffer may not always be an array index, and may require further processing to turn it into one. Function indices less than 99 999 are reserved for built-in functions, while indices in the range from 100 000 up to 499 999 are reserved for scripts. Indices above or equal to 500 000 are inaccessible via YYToolkit and are reserved for extension functions.
Return Value
Value | Description |
---|---|
AURIE_SUCCESS |
The named routine was found, and an index was written into the buffer. |
AURIE_MODULE_INTERNAL_ERROR |
The internal function needed is unavailable. |
AURIE_INVALID_PARAMETER |
FunctionIndex does not point to a valid buffer. |
AURIE_OBJECT_NOT_FOUND |
The named routine does not exist. |
Requirements
Criterium | Value |
---|---|
Minimum YYTK Version | 3.0.0 |
Context | Any |