# ShowAllRooms() and callback\_ShowAllRooms()

## Description

This function scans your server for all rooms, including private rooms with just 1 client there and returns that as an array of strings in the callback.

#### Syntax

```
ShowAllRooms()
```

#### Returns

```
N/A
```

## Where do I get the final array of rooms?

After a successful scan on your server the callback function **callback\_ShowAllRooms()** is called. So under Scripts/Rocket Networking/Callback Functions , you can edit this to do whatever you want…

### Example Implementation of callback

<figure><img src="https://1224219250-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYO9I4EKmgDF783aI7J4%2Fuploads%2FSB7GF7ukdSsZqQB85QUt%2Fimage.png?alt=media&#x26;token=fc638bbb-3ba8-4f42-a91f-b4f359fecbbb" alt=""><figcaption></figcaption></figure>

* Here I’ve just done a show\_message so the user is shown a dialog box with that message but you get the idea

<figure><img src="https://1224219250-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYO9I4EKmgDF783aI7J4%2Fuploads%2FMaBULmC5wzwD4Dkayb3x%2Fimage.png?alt=media&#x26;token=e4163fce-879d-47b7-835a-97bfd7fd0710" alt=""><figcaption></figcaption></figure>

* The 1 at the beginning means true , so it does return an array and that array in my case is shown.
* This means there are 2 rooms “7” and “9” containing their own clients and there are also 2 rooms called “moon” and “public”
