---
title: "createRoom后为什么收不到任何事件？"
author: "ycy303"
date: "2009-01-09T15:33:45Z"
tags: ["PHP"]
slug: "createroom"
draft: false
lastmod: "2009-01-09T15:34:35Z"
id: 313530
url: "https://chengyun.iteye.com/blog/313530"
---

我用sfsClient.createRoom生成新房间后，为什么收不到服务器返回的消息。比如应该收到的：

- [SFSEvent.onRoomAdded](http://www.smartfoxserver.com/docs/docPages/as3/html/it_gotoandplay_smartfoxserver_SFSEvent.html#onRoomAdded)
- [SFSEvent.onCreateRoomError](http://www.smartfoxserver.com/docs/docPages/as3/html/it_gotoandplay_smartfoxserver_SFSEvent.html#onCreateRoomError)
- [SFSEvent.onUserCountChange](http://www.smartfoxserver.com/docs/docPages/as3/html/it_gotoandplay_smartfoxserver_SFSEvent.html#onUserCountChange)
- 这让我郁闷了很久。今天在[http://www.smartfoxserver.com/forums/viewtopic.php?t=4265&highlight=create+room](http://www.smartfoxserver.com/forums/viewtopic.php?t=4265&amp%3Bhighlight=create%20room)
- 看到这句话，让我茅舍打开。晕。在createRoom前，先加入默认房间就可以了。

You need to join one **room** at least before you can start interacting with the server.