Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

how do I get ride of a error?

Discussion in 'Multiplayer' started by person90111, Mar 28, 2023.

  1. person90111

    person90111

    Joined:
    May 18, 2022
    Posts:
    20
    I get this error when I leave the match and I'm wondering how I fix it.

    Code (CSharp):
    1. ArgumentException: An item with the same key has already been added. Key: 999
    2. System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    3. System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    4. Photon.Pun.PhotonNetwork.RegisterPhotonView (Photon.Pun.PhotonView netView) (at C:/Users/Ruch Family/Documents/jack's assignments/Barbarians/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs:927)
    5. Photon.Pun.PhotonView.Awake () (at C:/Users/Ruch Family/Documents/jack's assignments/Barbarians/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs:266)
    I have been trying to work around it but it is very difficult, thanks.
     
  2. person90111

    person90111

    Joined:
    May 18, 2022
    Posts:
    20
    and I am using photon PUN 2