1. Jengas

    Jengas Naked Wanderer

    Hello! I just made a plugin with code

    void OnPlayerConnected(ClientInfo info)
    {
    Puts("OnPlayerConnected works!");
    }

    And i get error like this: [Error] Failed to call hook 'OnPlayerConnected' on plugin 'Plugin v1.0' (KeyNotFoundException: The given key was not present in the dictionary.)
     
    Last edited by a moderator: Nov 6, 2016
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Are you sure that's ALL of the code you have? There isn't any dictionary in the hook with Oxide, so there's no reason for you to get KeyNotFoundException.
     
  3. Jengas

    Jengas Naked Wanderer

    Can i tell you in PM code of my script, so you help me with this errors? Because in A14.7 all was working fine
     
    Last edited: Nov 6, 2016
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Sent you a PM for it.
     
  5. NeoBlaze64

    NeoBlaze64 Naked Wanderer

    The "Key not found" Exception is from trying to call something from a dictionary when there isn't anything there. I struggled with this when playing around with a script. In my case, I was using the wrong variable after changing the name of it, then changing back again, and forgetting to fix it when I decided to run with changing the name.