xboxlive_stats_get_stat_names


Description

This function can be used to retrieve all the defined stats from the stat manager for a given user. You supply the user ID as returned by (for example) the function xboxlive_get_user(), and the function will return an array of strings containing the statistics for the user. If an error occurs or the user has no stats the array will still be returned but will have an element count of 0.

IMPORTANT! This function is only valid when exporting using the UWP target for the Xbox One and it requires you to have checked the Enable XBox Live option in the UWP Game Options.


Syntax:

xboxlive_stats_get_stat_names(user_id);

Argument Description
user_id The user ID pointer to get the stat names of


Returns:

Array


Example:

var _stat_str = xboxlive_stats_get_stat_names(user_id);
for (var i = 0; i < array_length_1d(_stat_str); ++i;)
    {
    xboxlive_stats_delete_stat(user_id, _stat_str[i]);
    }

The above code retrieves all the defined stats for the user ID pointer stored in the given variable, and then loops through the array and deletes the specified stat from the stat manager.