xboxlive_gamerscore_for_user


Description

This function will return the XBox Live gamerscore for the given user ID pointer.

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_gamerscore_for_user(user_id);

Argument Description
user_id The user ID (a pointer) to check


Returns:

Real


Example:

var _a = 0;
var _num = xboxlive_get_user_count();
for (var i = 0; i < _num; ++i;)
    {
    var _uid = xboxlive_get_user(i);
    if _uid != pointer_null
        {
        global.UserName[_a] = xboxlive_gamedisplayname_for_user(_uid);
        global.UserScore[_a] = xboxlive_gamerscore_for_user(_uid);
        global.UserRep[_a] = xboxlive_reputation_for_user(_uid);
        global.UserAvatar[_a] = xboxlive_sprite_add_from_gamerpicture(_uid, 256, 0, 0);
        ++a;
        }
    }

The above code loops through the logged in users and stores their gamer data in various global arrays.