-
Notifications
You must be signed in to change notification settings - Fork 0
Next: CallBuiltin
Calls a GameMaker built-in function with user-specified arguments.
RValue CallBuiltin(
[in] const char* FunctionName,
[in] std::vector<RValue> Arguments
);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.
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.
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.