Next: GetMethodParameterCount - AurieFramework/YYToolkit GitHub Wiki

Gets the number of arguments needed for a built-in function call.

Syntax

AurieStatus GetMethodParameterCount(
    [in]  std::string_view MethodName,
    [out] int32_t&         Count
);

Parameters

MethodName

A pointer to the buffer containing the name of the function to look up. This parameter can only refer to a GameMaker built-in function.

Count

A reference to a 32-bit buffer into which the number of parameters will be written. This count may not always be accurate. Functions taking optional arguments may return -1. Some functions, eg. surface_create may also return -1, as they take a variable amount of arguments, despite YoYoGames' documentation suggesting otherwise.

Return Value

Value Description
AURIE_SUCCESS The named routine was found, and the parameter count was written into the buffer.
AURIE_MODULE_INTERNAL_ERROR The internal function needed is unavailable.
AURIE_ACCESS_DENIED MethodName refers to a script or an extension function.
AURIE_OBJECT_NOT_FOUND The named routine does not exist.

Requirements

Criterium Value
Minimum YYTK Version 5.0.0
Context Any