NullReferenceException at StatusFixed


This pops up when loading the addon

(17:39:14) | Loaded plugin Discord Status v1.0.1 by Tricky
(17:40:29) | Unloaded plugin Discord Status v1.0.1 by Tricky
(17:40:29) | Failed to call hook 'OnServerInitialized' on plugin 'DiscordStatus v1.0.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordStatus.Status () [0x00077] in <9acb87bc3df24578b2e340730b933537>:0 
  at Oxide.Plugins.DiscordStatus.OnServerInitialized () [0x0002c] in <9acb87bc3df24578b2e340730b933537>:0 
  at Oxide.Plugins.DiscordStatus.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00117] in <9acb87bc3df24578b2e340730b933537>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
(17:40:29) | Loaded plugin Discord Status v1.0.1 by Tricky


Also the bot pops up in discord BUT dosent display the number of online/total players in discord

Hey sorry about that, try the new version
(18:29:52) | Unloaded plugin Discord Status v1.0.1 by Tricky
(18:30:11) | DiscordStatus was compiled successfully in 4386ms
(18:30:11) | Loaded plugin Discord Status v1.0.2 by Tricky
(18:30:11) | Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordStatus.Status () [0x00077] in <49f20230d2784db085af07cc7fe62c44>:0 
  at Oxide.Plugins.DiscordStatus.<OnServerInitialized>m__0 () [0x00000] in <49f20230d2784db085af07cc7fe62c44>:0 
  at Oxide.Core.OxideMod.OnFrame (System.Single delta) [0x00051] in <4452f821def6406d834e4149849fe7ea>:0
Try now!
PERFECT! No errors and its relaying how many players are online. Thank you for fixing this so quickly!
No Problem! That's what we do here ^^
Here's what I got.
Failed to call hook 'OnUserDisconnected' on plugin 'DiscordStatus v1.0.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordStatus.Status () [0x00077] in <841a0085bd1c4a5ba4cf750e976399be>:0 
  at Oxide.Plugins.DiscordStatus.OnUserDisconnected (Oxide.Core.Libraries.Covalence.IPlayer player) [0x00000] in <841a0085bd1c4a5ba4cf750e976399be>:0 
  at Oxide.Plugins.DiscordStatus.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001c3] in <841a0085bd1c4a5ba4cf750e976399be>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 ​

 

You're using an old version of the plugin, I'd suggest updating.
Locked automatically