Skip to content

Next: GetScriptData

Archie_UwU edited this page Jan 2, 2024 · 3 revisions

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

The function returns AURIE_SUCCESS on success, otherwise returns a matching error code. If the internal runner function needed for indexing the script array isn't available, the AURIE_MODULE_INTERNAL_ERROR status code is returned. The function returns AURIE_OBJECT_NOT_FOUND array index provided via the Index parameter is out of bounds.

Quick Access

Documentation

Writeups

Clone this wiki locally