I had a client-side problem. I wasn't passing the property at all.
Posts made by virtumonde
Client:
client.joinOrCreate("website", { domain: "zuckbuck.com", accessToken: this.props.that.state.token });
Server:
onCreate(options : any) {
console.log(options)
// { accessToken: 'token' }
}
Thoughts?
Is there a way to instantiate different rooms from the client without defining each room id? What I want to achieve is for the players to be able to create their own rooms. I know that the client.joinOrCreate would create a new room only when the room id is defined on the server like this:
gameServer.define('roomId', Room);
How can I create different rooms from the client-side without having to define each id? I want the client to be able to create rooms with any id without defining that id explicitly in the server.
Thank you, @endel. I will publish another quick question as a new thread if you don't mind.
Is there a way to store an instance of a class extending @colyseus/schema directly into a database?
I think I saw exactly the same bug being described previously in this forum, @endel.
@endel Thank you, I am aware of this. As I understand @colyseus/schema doesn't support multiple classes, right?
For whoever may read this: check the state with room.onStateChange, not right away you are connecting to the room.