Skip to content

Legacy: GetFunctionByName routine

Archie_UwU edited this page Nov 19, 2023 · 2 revisions

You are reading the documentation of YYToolkit Legacy (v2.x.x) - for documentation on current-gen YYTK, see the Homepage.


Finds a built-in function by it's name, and returns the pointer to it.

Syntax

bool GetFunctionByName(
    const std::string& Name // The name of the function (ex. "room_goto", "array_get")
    TRoutine& outRoutine // The variable that receives the address of the built-in function
);

Parameters

Name

The name of the built-in function. These are the same as the function names used in GameMaker Language, and are case-insensitive.

Thus, room_goto is the same as RoOm_GoTo, and both will find the same function.

outRoutine

A reference to a TRoutine function pointer, which will receive the address of the built-in function.

Return Value

The function returns true if the function is found, and the pointer is returned via outRoutine.

Otherwise, the function returns false and outRoutine's contents are unchanged.

Quick Access

Documentation

Writeups

Clone this wiki locally