Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyNotFoundException: The given key was not present in the dictionary. #28

Closed
shophk opened this issue Oct 16, 2017 · 1 comment
Closed

Comments

@shophk
Copy link

shophk commented Oct 16, 2017

Hi,

I might not be using the right terms to describe what I want to achieve but please bear with me on the following description:

This is from he example code ColyseusClient.cs

room.Listen ("players/:id/:axis", this.OnPlayerMove);
room.Listen ("players/:id", this.OnPlayerChange);
room.Listen ("messages/:number", this.OnMessageAdded);
room.Listen("test_messages/:odd_numbers", this.OnMessageAdded);

Where do I check to find the key axis this set in players object?
Where do I check to find the key number for messages?

How do I add new keys?
For example,
constructor () {
super();

this.setState({
  players: {},
  messages: [],
  test_messages: []
});

}

In test_messages I would like a key to be name "odd_numbers" instead of numbers, how to change it? Or documentation explaining this would help.

@endel
Copy link
Member

endel commented Oct 19, 2017

Hi @shophk,

I've updated the example project. Maybe it's a bit clearer now how it works.

Let me know if you still have any questions. Feel free to re-open this issue if you need to.

@endel endel closed this as completed Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants