NullReferenceException at OnUserConnectedError

Failed to call hook 'OnUserDisconnected' on plugin 'DiscordServerStats v2.0.0' any fix soon please?

Without more of the error message I can't say exactly what's going on but my guess is somehow your data file got corrupted. Unload the plugin delete the oxide/data/DiscordServerStats.json and reload the plugin.

Ive uploaded edited the json file saved reuploaded the json reloaded the plugin and i dont get the hook to my discord?

MJSU

Without more of the error message I can't say exactly what's going on but my guess is somehow your data file got corrupted. Unload the plugin delete the oxide/data/DiscordServerStats.json and reload the plugin.

Are you getting any error messages in server console?

Nothing at all, So i uploaded the plugin and the api plugin to oxide/plguins

edited the discord webhook thing in the discordserverstats.json reuploaded it, reloaded both plugins and nothing happens with my discord, I tried a different channel, and different webhook with no luck

MJSU

Are you getting any error messages in server console?

Can you add me on discord MJSU#0814 and share your server log.

Yeah I'm getting the same error, even when the Webhook URL was already configured. The server would lag out.

So in the log / console this is the error I've been seeing. Even after disabling every single piece of info to be displayed to ; false

It's beyond me why it randomly just stopped working...

16:04 [Info] Unloaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to call hook 'OnServerInitialized' on plugin 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.OnUserConnected (Oxide.Core.Libraries.Covalence.IPlayer player) [0x00022] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.OnServerInitialized () [0x0001d] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00211] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:04 [Info] Loaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to run a 1.00 timer in 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.SetupMessaging () [0x00041] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.<OnPlaceholderAPIReady>m__2 () [0x00070] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:04 [Info] Unloaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to call hook 'OnServerInitialized' on plugin 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.OnUserConnected (Oxide.Core.Libraries.Covalence.IPlayer player) [0x00022] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.OnServerInitialized () [0x0001d] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00211] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:04 [Info] Loaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to run a 1.00 timer in 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.SetupMessaging () [0x00041] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.<OnPlaceholderAPIReady>m__2 () [0x00070] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:04 [Info] Unloaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to call hook 'OnServerInitialized' on plugin 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.OnUserConnected (Oxide.Core.Libraries.Covalence.IPlayer player) [0x00022] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.OnServerInitialized () [0x0001d] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00211] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:04 [Info] Loaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to run a 1.00 timer in 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.SetupMessaging () [0x00041] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.<OnPlaceholderAPIReady>m__2 () [0x00070] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:04 [Info] Unloaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to call hook 'OnServerInitialized' on plugin 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.OnUserConnected (Oxide.Core.Libraries.Covalence.IPlayer player) [0x00022] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.OnServerInitialized () [0x0001d] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00211] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:04 [Info] Loaded plugin Discord Server Stats v2.0.0 by MJSU
16:04 [Error] Failed to run a 1.00 timer in 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.SetupMessaging () [0x00041] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.<OnPlaceholderAPIReady>m__2 () [0x00070] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:05 [Info] Unloaded plugin Discord Server Stats v2.0.0 by MJSU
16:05 [Error] Failed to call hook 'OnServerInitialized' on plugin 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.OnUserConnected (Oxide.Core.Libraries.Covalence.IPlayer player) [0x00022] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.OnServerInitialized () [0x0001d] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00211] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <3606d2af539c45e4b5c61658e6a8b307>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:05 [Info] Loaded plugin Discord Server Stats v2.0.0 by MJSU
16:05 [Error] Failed to run a 1.00 timer in 'DiscordServerStats v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.SetupMessaging () [0x00041] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Plugins.DiscordServerStats.<OnPlaceholderAPIReady>m__2 () [0x00070] in <f5b3ab90ec4a4dfaa16b87f098c9d881>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
16:06 [Info] Unloaded plugin Discord Server Stats v2.0.0 by MJSU

Did you do what was mentioned above by deleting the data file?