-
Notifications
You must be signed in to change notification settings - Fork 13
Next: GetNamedRoutineIndex
Looks up a named object in various runner data structures.
AurieStatus GetNamedRoutineIndex(
[in] const char* FunctionName,
[out] int* FunctionIndex
);
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 named scr_my_script
. This behavior is consistent for all types of lookups.
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.
The function returns AURIE_SUCCESS
on success, otherwise returns a matching error code. If the internal runner function needed for looking up named objects isn't available, the AURIE_MODULE_INTERNAL_ERROR
status code is returned. The function returns AURIE_OBJECT_NOT_FOUND
if the lookup failed.