SharedPlayerCount ( )

Parameters

None.

Description

Returns how many players are in the room, including you.

A room holds up to 16 players: the host and 15 others. A server room holds up to 128 people and bots, and its server isn't one of them. Loop from 1 to SharedPlayerCount() with SharedPlayerID to list them:

For index=1 To SharedPlayerCount()
    player=SharedPlayerID(index)
    Text 10,30+index*20,SharedPlayerName(player)
Next

Returns 0 with no session.

For the full story - services, hosting, sharing and host migration - see the Shared World guide and its complete Shared_World_Playground.bb sample.


See also: SharedPlayerID, SharedPlayerName, SharedLocalPlayer, RecvSharedEvent.

Index