KeyNotFoundException at GetPlayerDataFixed
Made everything from scratch. How to remove an error?
Failed to call hook 'GetPlayerData' on plugin 'PlayerDatabase v1.6.1' (KeyNotFoundException: The given key was not present in the dictionary.)
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <437ba245d8404784b9fbab9b439ac908>:0 
  at Oxide.Plugins.PlayerDatabase.GetPlayerData (System.String userid, System.String key) [0x000ad] in <3167edb6a4264269adc213a639c5036b>:0 
  at Oxide.Plugins.PlayerDatabase.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002ad] in <3167edb6a4264269adc213a639c5036b>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0 
Failed to call hook 'GetPlayerData' on plugin 'PlayerDatabase v1.6.1' (KeyNotFoundException: The given key was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <437ba245d8404784b9fbab9b439ac908>:0
at Oxide.Plugins.PlayerDatabase.GetPlayerData (System.String userid, System.String key) [0x000ad] in <6ecaaa451c844cac898cf9838dff351f>:0
at Oxide.Plugins.PlayerDatabase.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002ad] in <6ecaaa451c844cac898cf9838dff351f>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0

This problem only occurs if the PlayerInformation plugin is loaded and appears when a player connects to the server

Sorry mistake in PlayerInformation because author "GetPlayerData" but it needs to be read GetPlayerDataRaw for List :)
I get this too and I use both PlayerDatabase and PlayerInformation.

I found the issue...

Seems a copy and paste error.

Under 

object GetPlayerData(string userid, string key)​

Change

            else if (dataType == DataType.MySql)
            {
                if (!isValidColumn2(key)) return null;
                if (sqlData[userid] == null) return null;
                if (sqlData[userid][key] == null) return null;
                return sqliteData[userid][key];
            }

To

            else if (dataType == DataType.MySql)
            {
                if (!isValidColumn2(key)) return null;
                if (sqlData[userid] == null) return null;
                if (sqlData[userid][key] == null) return null;
                return sqlData[userid][key];
            }
Thanks for pointing that out, I submitted a patch that @FakeNinja can approve to fix this.

Anyone know when this patch is going to go through ?

JejytN6qKwIigAz.png P4R4

Anyone know when this patch is going to go through ?

The author hadn't merged or commented, so merged it manually.

Locked automatically