Error on plugin load
Hi,

I'm getting the following when trying to load the plugin, latest version of oxide latest version of the plugin and placeholder is the most recent also.
I've tried removing the config file and starting again but that hasn't worked either unfortunately.

Any advice?

Thanks

Failed to initialize plugin 'DiscordServerStats v2.1.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.Init () [0x00021] in <98d7894ca07f434ab41d48180f38be87>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00038] in <98d7894ca07f434ab41d48180f38be87>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <e23ba2c0f246426296d81c842cbda3af>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0 
  at Oxide.Core.Plugins.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00043] in <50629aa0e75d4126b345d8d9d64da28d>:0 
Failed to initialize plugin 'DiscordServerStats v2.1.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.Init () [0x00021] in <98d7894ca07f434ab41d48180f38be87>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00038] in <98d7894ca07f434ab41d48180f38be87>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in :0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <50629aa0e75d4126b345d8d9d64da28d>:0 
  at Oxide.Core.Plugins.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00043] in <50629aa0e75d4126b345d8d9d64da28d>:0  

On May 30, the plugin last worked.

(10:14:11) | Failed to initialize plugin 'DiscordServerStats v2.1.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.DiscordServerStats.Init () [0x00021] in <7af4537f7ad34b14afbd061c8ff0ff25>:0 
  at Oxide.Plugins.DiscordServerStats.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00038] in <7af4537f7ad34b14afbd061c8ff0ff25>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <e23ba2c0f246426296d81c842cbda3af>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <46ff2b534abb4b35952608167523b7ec>:0 
  at Oxide.Core.Plugins.CSPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00043] in <46ff2b534abb4b35952608167523b7ec>:0
(10:14:11) | Unloaded plugin Discord Server Stats v2.1.0 by MJSU
(10:14:11) | No previous version to rollback plugin: DiscordServerStats


Merged post

I would really like this plugin to work. Please make a fix.

Hey, Can you share your config file? Be sure to remove the webhook url.

MJSU

Hey, Can you share your config file? Be sure to remove the webhook url.

{
  "Stats Messages": [
    {
      "Discord Webhook": "https://discordapp.com/api/webhooks/964058360110000000/-----------------------",
      "Message Update Interval (Minutes)": 3.0,
      "Embed Message": {
        "Content": "",
        "Embeds": [
          {
            "Enabled": true,
            "Title": "{server.name}",
            "Description": "update (3 min)",
            "Url": "",
            "Embed Color": "#6495ED",
            "Image Url": "",
            "Thumbnail Url": "",
            "Add Timestamp": true,
            "Fields": [
              {
                "Title": "status",
                "Value": "{discordserverstats.status}",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "online",
                "Value": "{server.players} / {server.players.max}",
                "Inline": true,
                "Enabled": true
              },
              {
                "Title": "sleep",
                "Value": "{server.players.sleepers}",
                "Inline": true,
                "Enabled": true
              },
              {
                "Title": "in",
                "Value": "{server.players.loading}",
                "Inline": true,
                "Enabled": true
              },
              {
                "Title": "queue",
                "Value": "{server.players.queued}",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "time",
                "Value": "{server.time:HH:mm:ss}",
                "Inline": true,
                "Enabled": true
              },
              {
                "Title": "size",
                "Value": "{world.size!km}000",
                "Inline": true,
                "Enabled": true
              },
              {
                "Title": "entity",
                "Value": "{server.entities}",
                "Inline": true,
                "Enabled": true
              },
              {
                "Title": "FPS",
                "Value": "{server.fps}",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "seed",
                "Value": "[{world.seed}](https://rustmaps.com/map/{world.size}_{world.seed})",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "Protocol",
                "Value": "{server.protocol}",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "ram",
                "Value": "{server.memory.used:0.00!gb} GB / {server.memory.total:0.00!gb} GB",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "net",
                "Value": "In: {server.network.in:0.00!kb} KB/s Out: {server.network.out:0.00!kb} KB/s ",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "wipe",
                "Value": "{server.map.wipe.last:dd/MM/yyyy HH:mm!local}",
                "Inline": true,
                "Enabled": true
              },
              {
                "Title": "wipe bp",
                "Value": "{server.blueprints.wipe.last:dd/MM/yyyyy HH:mm:ss tt!local}",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "Last Joined",
                "Value": "{player.joined.last}",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "Last Disconnected",
                "Value": "{player.disconnected.last} ({player.disconnected.last.duration:%h}H {player.disconnected.last.duration:%m}M {player.disconnected.last.duration:%s}S)",
                "Inline": false,
                "Enabled": false
              },
              {
                "Title": "enter",
                "Value": "steam://connect/{server.address}:{server.port}",
                "Inline": false,
                "Enabled": true
              }
            ],
            "Footer": {
              "Icon Url": "",
              "Text": "",
              "Enabled": false
            }
          }
        ]
      }
    }
  ],
  "Debug Level (None, Error, Warning, Info)": "Warning"
}

Can you add me on discord MJSU#0814. Need to get some additional information.

Maybe it will be informative for someone. There was a corrupted data file. The problem is solved.