question

Yarik avatar image
Yarik asked

GetPlayersInSegment = 0

Hi I use GetPlayersInSegment and my result = 0, but my segment have 3 players. I trying create new segment, but result = 0. How to fix this?

,

Hi
I use GetPlayersInSegment and my result = 0, but my segment have 3 players. I trying create new segment, but result = 0. How to fix this?

apis
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Can you let us know the Title ID and the Segment ID, so that we can have a look?

9 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yarik avatar image Yarik commented ·

TitleID = 2431; SegmentID = D597C63F227066B0

0 Likes 0 ·
brendan avatar image brendan Yarik commented ·

When I call GetPlayersInSegment for your Title ID, using that Segment ID, it returns all three player in the Segment:

{
    "code": 200,
    "status": "OK",
    "data": {
        "ProfilesInSegment": 3,
        "PlayerProfiles": [
            {
                "PlayerId": "3DB79B0378E6AE81",
[details removed]
            },
            {
                "PlayerId": "758F9B0364CA19FD",
[details removed]
            },
            {
                "PlayerId": "BBE453B3E423683E",
[details removed]
            }
        ]
    }
}

Can you provide more details on specifically how you're making the call?

0 Likes 0 ·
Yarik avatar image Yarik brendan commented ·
    public void TotalPlayers()
    {
        GetPlayersInSegmentRequest request = new GetPlayersInSegmentRequest();
        request.SegmentId = SegmentID;
        PlayFabAdminAPI.GetPlayersInSegment(request, UpperMain, OnApiCallError);
    }
    void UpperMain(GetPlayersInSegmentResult result)
    {
        result = new GetPlayersInSegmentResult();
        AdminTXT.text = UserManager.displayname;
        countTXT.text = result.ProfilesInSegment.ToString();
        Debug.Log("Players in Segment: " + result.ProfilesInSegment);
    }

0 Likes 0 ·
Show more comments
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.