NullReferenceException at AddressHandler.EnqueueError
Hi there, I keep getting this error on my 7 Days to Die server. I use placeholder for my Discord Presence bot if that is relevant.
Hey, what is the full error?
Failed to call hook 'OnUserApproved' on plugin 'PlaceholderAPI v2.1.1' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Game.SevenDays.SevenDaysPlayer.get_Address () [0x00000] in <ee2d658329a246adb1989923405d6587>:0
at Oxide.Plugins.PlaceholderAPI+AddressHandler.Enqueue (Oxide.Core.Libraries.Covalence.IPlayer player, System.String address) [0x00006] in <32d97dc091db42b9bb6357c62a32eade>:0
at Oxide.Plugins.PlaceholderAPI.OnUserApprovedInternal (Oxide.Core.Libraries.Covalence.IPlayer player, System.String address) [0x00010] in <32d97dc091db42b9bb6357c62a32eade>:0
at Oxide.Plugins.PlaceholderAPI.OnUserApproved (System.String username, System.String id, System.String address) [0x0000d] in <32d97dc091db42b9bb6357c62a32eade>:0
at Oxide.Plugins.PlaceholderAPI.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0044c] in <32d97dc091db42b9bb6357c62a32eade>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <6d216ec3b28049f083ea5b71ddb0f6a4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <d1894f702e04464fb0139455d2a30ba0>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d1894f702e04464fb0139455d2a30ba0>:0
That's more likely an issue with that hook and Oxide, with something not being available at that point.
Failed to call hook 'OnUserApproved' on plugin 'PlaceholderAPI v2.1.1' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Game.SevenDays.SevenDaysPlayer.get_Address () [0x00000] in <6e7399aa6f66446e98fb86223fe94104>:0
  at Oxide.Plugins.PlaceholderAPI+AddressHandler.Enqueue (Oxide.Core.Libraries.Covalence.IPlayer player, System.String address) [0x00006] in <b68a7b2404684516ad29bd2f38c0668c>:0
  at Oxide.Plugins.PlaceholderAPI.OnUserApprovedInternal (Oxide.Core.Libraries.Covalence.IPlayer player, System.String address) [0x00010] in <b68a7b2404684516ad29bd2f38c0668c>:0
  at Oxide.Plugins.PlaceholderAPI.OnUserApproved (System.String username, System.String id, System.String address) [0x0000d] in <b68a7b2404684516ad29bd2f38c0668c>:0
  at Oxide.Plugins.PlaceholderAPI.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0044c] in <b68a7b2404684516ad29bd2f38c0668c>:0
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <6d216ec3b28049f083ea5b71ddb0f6a4>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <d1894f702e04464fb0139455d2a30ba0>:0
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d1894f702e04464fb0139455d2a30ba0>:0
I keep getting this on my 7 days to die server.
Seems like there is an issue with Oxide getting player address in 7D2D.

Merged post

If you reload, does this happen on plugin startup as well or only when new players join?
Looks like the game isn't providing the IP address at that point. May have to provide an alternative means of getting it.

Merged post

Actually, looks like you are trying to use the IPlayer, which isn't fully setup at that point. Only the name and ID are available that early. So anything other than the name or ID won't be available there yet.

Hi there, I updated Placeholder, popped it on my 7 days to die server and got this in the console.

Oxide.Game.Rust is referenced by PlaceholderAPI plugin but is not loaded! An appropriate include file needs to be saved to plugins\include\Ext.Rust.cs if this extension is not required.

Does the plugin work or not when this appears? Suppose not
oh ive already gone back to v2.1.1. Works fine.
5f5631c33fa20.png misticos
Does the plugin work or not when this appears? Suppose not
Preprocessors in using statements do not work. You'll need to use the fully qualified names for the methods using those namespaces.

Oxide.Game.Rust is referenced by PlaceholderAPI plugin but is not loaded! An appropriate include file needs to be saved to plugins\include\Ext.Rust.cs if this extension is not required.

Im getting this on my 7d2d server.

Merged post

seems like v2.1.1 is compatible with 7d2d but has bugs. 

v2.2.0 doesnt work with 7d2d.

Right, the above would need to be changed.
Ive had to go back to using Discord Presence v0.11.0 in an attempt to stop getting errors/bugs.