Skip to content

Next: CallBuiltin

Archie_UwU edited this page Dec 25, 2023 · 2 revisions

Calls a GameMaker built-in function with user-specified arguments.

Syntax

RValue CallBuiltin(
    [in] const char*         FunctionName,
    [in] std::vector<RValue> Arguments
);

Parameters

FunctionName

The name of the function to call. This parameter must refer to a built-in function, not a script. Function names are case-sensitive. The function referred to by this parameter is called in a global context, where both self and other point to the global namespace. While this is not an issue for most built-in functions, some may cause issues. To use custom instances in the call, see the CallBuiltinEx function.

Arguments

A vector of RValues, containing all the arguments to pass into the built-in function. The order of these arguments is the same as if calling the function from GML itself.

Return Value

The function does not offer a way of reliably identifying error conditions. On error, the function returns an unset RValue. An unset RValue may be returned either by a function that returns N/A (as per GameMaker documentation). On success, the function returns an engine-allocated RValue. For proper error handling, see the CallBuiltinEx function.

Quick Access

Documentation

Writeups

Clone this wiki locally