Whenever i try to join room with quick match i get this error
Error: Failed to auto-create room "table" during join request using options "
{"create":false,"requestId":1,"clientId":"7klsqdU1v","sessionId":"eYHS93fBq"}"
at MatchMaker.create (D:\Colysues Server Unity\Server\node_modules\colyseus\lib\MatchMaker.js:228:19)
at MatchMaker.<anonymous> (D:\Colysues Server Unity\Server\node_modules\colyseus\lib\MatchMaker.js:114:31)
at Generator.next (<anonymous>)
at fulfilled (D:\Colysues Server Unity\Server\node_modules\colyseus\lib\MatchMaker.js:4:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
although if there is any available room it worked just fine and join that room. problem occurs when there is no room available to join (should not it automatically create a room ?)
here's server onJoin method
requestJoin (options, isNew) {
console.log("request join!", options);
return (options.create)? (options.create && isNew) : this.clients.length > 0;
}
onJoin (client, options) {
console.log("client joined! ", options);
}
Unity client code
string roomName = "table"
//for Quick Join
public void Join()
{
room = client.Join(roomName, new Dictionary<string, object>()
{
{ "create", false}
});
StartCoroutine(ConnectToRoom());
}
//for Creting new room
public void Create()
{
Debug.Log("Let's Crete & join the room!");
room = client.Join(roomName, new Dictionary<string, object>()
{
{ "create", true },
});
StartCoroutine(ConnectToRoom());
}