variable_instance_names_count


Description

With this function you can find the total number number of variables defined for an instance, or in the global scope. You supply the instance ID to check, or the global keyword, and the function will return an integer value for the number of variables encountered, or (if no instance of the given ID exists) -1.


Syntax:

variable_instance_names_count(instance_id/global);

Argument Description
instance_id The unique ID value of the instance to check or the keyword global


Returns:

Real (integer)


Example:

var _num = variable_instance_names_count(global); show_debug_message("Global Variables = " + string(_num));

The above code will retrieve the number of defined global variables and show a debug message in the console output with this value.