- Code: Select all
client.multiplayer.createRoom("test", "NewGame", true, {}, handleJoin, handleError);
seems to keep giving this error:
TypeError: Error #1034: Type Coercion failed: cannot convert "test" to playerio.Connection.
at Function/<anonymous>()
at Function/<anonymous>()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Does this method join the room as well as creating it? I'm a bit confused.
I'm trying to develop a two player game right now. What's the best way of managing the rooms such that the first player to join creates a new room with a random ID and another player joins that room or creates a new one if that one is full. Simple problem I know, but what's the best solution? I tried createJoinRoom() but using 'null' as the first parameter just joins the room that's already open.
Cheers,
Matt