https://www.scirra.com/tutorials/906/mu ... oom/page-4
Upon joining a room, you can check if you are the host or not. If not, increment the room name/number and try again.
Idea just off the top of my head, I haven't really explored the multiplayer object myself.
Edit: There is a request room list action. You can use that to make sure you aren't joining a room that exists already.