- Home /
KeyNotFoundException: The given key was not present in the dictionary
Hello, so basically am new to unity and specially for uNet, I wanted to create a multiplayer game, I followed brackeys tutorials, It was going so good until I reached episode 7, In there When he did the damage part I did what he did, but then I got the following error : KeyNotFoundException: The given key was not present in the dictionary, I searched On internet and even went to the video comment section but no body talked about that, Hopefully I find a way to get rid of this, and here is the code problem:
public static Player GetPlayer (string _playerID)
{
return players[_playerID]; // When I click the error it takes me to this line.
}
_playerID
is a string make it an int instead... then check what happens?
Your answer
Follow this Question
Related Questions
Games runs perfectly on editor but error on build 1 Answer
"Could Not Produce Class with ID 1108" error 0 Answers
If you solve my this problem I`ll give you 100 points. My problem is --Cannot download entry--. 1 Answer
**Trying to access out-of-bounds terrain height information** When calling TerrainData.GetHeights(); 0 Answers