question

Satriyo Aji Nugroho avatar image
Satriyo Aji Nugroho asked

Is Group on Server service and Entity service is different?

So, I bit confused about using the playfab group

I trying to make Private Message Player. using Shared Group and cloud script. The idea is like this. when the user pushes a button message on a friend profile. then users go to the message panel and they can chat

The input: Current player id, Friend Id

The Process :
1. Get all groups on the current player member. using (entity.ListMembership()

2. Check each group. That they had data key "Player_Message" and check if a friend is a member in that group

3. If it's true. then return data value key "Player_Message"

4. if there is no data key and friends are not members of each group. Then create a new group and add current and friend as a member

The Problem :
1. When I tried to execute for the first time. its works. Because it's the first time between current player and friend chatting, it creates a new group. but I can't find the group that I created on game manager.

2. When I tried to execute on the second time. On process 1, it's saying there is no group. so it's creating a new group. Again I can't find the group I make on game manager.

3. I try to make a group manual on game manager. then I execute the script again. In process 1 I get results from the group I created manually. but on process 2, I got an error saying the id group does not exist. so it stops on there

The question :
1. So it's true that server service group is different from entity service group ?

2. I got confused with Group API Reference on website. When trying to call API on cloud script, its say use group.blablabla. but its not working saying there is no reference. If I use entity.blablabla its working. So, is it on website API reference not updated, or it's just me who wrong understand it?

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

·
Rick Chen avatar image
Rick Chen answered

The Shared Groups and Entity Groups are different. Shared Group Data was originally designed to be driven by server-authoritative for most cases. The Entity Groups are the root concept that was inspired by the need for clans/guilds and are using the Entity Programming Model. For more detail please refer to these documents: Using Shared Group Data and Entity groups.

On Game Manager, you can search the Shared Group in [Game Manager]->[Players]->[Shared Group Data]. Whereas the Entity Groups are located at [GameManager]->[Groups].

There is no pre-defined variable called “group” on CloudScript. The Group APIs are the Entity APIs, so you can use the pre-defined variable “entity” on CloudScript to call the Group 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.

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.