question

alligatorexpired avatar image
alligatorexpired asked

Delete Lobby on server or cloudscript

Is it possible to remove the lobby without having the initial Entity Token from the client? When trying to delete, the error "Only entities of the following types may call this API: game_server" is displayed, but the client cannot always delete the lobby on his own, since the game may hang or crash. And when reconnecting, the lobby cannot be deleted. I want to transfer the lobby id to the server so that it can delete the lobby at the end of its work, but I did not find the server function. Thank you for your help!

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

·
Gosen Gao avatar image
Gosen Gao answered

Only lobbies created by game_server can be deleted. Client created lobbies will be automatically deleted when all members are left. And PlayFab also has internal logic to handle inactive lobbies. So you don’ have to warry about the case that some client created lobbies are not deleted properly due to crash or something. Or you can follow Game Servers and Lobbies - PlayFab | Microsoft Learn to implement a service to let game server handle lobby creation and deletion.

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.