The AS 2.0 API Docs say for CreateRoom:
The roomId parameter is optional and only needed for advanced tasks, when using multiple room at the same time.
But I'm getting the following debug output
[Sending]: <msg t='sys'><body action='createRoom' r='null'><room upd='0' tmp='1' gam='1' spec='1' exit='1'><name><![CDATA[game1]]></name><pwd><![CDATA[undefined]]></pwd><max>50</max><uCnt>0</uCnt><vars><var n='Complexity' t='n' pr='1' pe='1'><![CDATA[3]]></var></vars></room></body></msg>
and the following logged error in the admin tool:
2007/04/18 16:09:52.071 - [ WARNING ] [id: 11] (SystemHandler.processEvent): SysHandler -> Bad room id. Action: createRoom >> java.lang.NumberFormatException: For input string: "null"
I've looked at the SmartFoxClient and found the following:
Code: Select all
public function createRoom(roomObj:Object, rId:Number)
{
var roomId:Number = (rId == undefined) ? this.activeRoomId : rId
//The rest of the function has been left out for readibilty
This is setting roomId to null as I haven't joined a room yet so my activeRoomId is null. What am I to do? Create my own index of Room Ids?
Any help, please?
David