Next: GetScriptData - AurieFramework/YYToolkit GitHub Wiki
Retrieves a pointer to the CScript object for a given script ID.
Syntax
AurieStatus GetScriptData(
[in] int Index,
[out] CScript*& Script
);
Parameters
Index
The index of an element within the runner's script array, the data of which to retrieve.
[!IMPORTANT] Script IDs returned by both GameMaker built-in functions and the GetNamedRoutineIndex function are offset by 100 000 due to how asset IDs are reserved.
To convert a script ID into the array index required by this function, subtract 100 000 from it.
Script
A reference to a pointer-sized buffer, into which the address of the script's data will be written. The contents of this buffer are guaranteed to be left untouched if the function fails.
Return Value
Value | Description |
---|---|
AURIE_SUCCESS |
The script lookup succeeded and the result was written into the buffer. |
AURIE_MODULE_INTERNAL_ERROR |
The internal function needed is unavailable. |
AURIE_OBJECT_NOT_FOUND |
The script does not exist. |
Requirements
Criterium | Value |
---|---|
Minimum YYTK Version | 3.0.1 |
Context | Any |