Jump to content

Cannot load plugin; using Vanish by whispers

Not a Bug 0.1.3

Daemante
Daemante

Posted (edited)

Here is the error in console:

[04.14 19:24:24] [CSharp] Started Oxide.Compiler v successfully
[04.14 19:24:27] [CSharp] Started Oxide.Compiler v successfully
[04.14 19:24:29] VanishStatus was compiled successfully in 1566ms
[04.14 19:24:29] Unloaded plugin Vanish Status v0.1.3 by IIIaKa
[04.14 19:24:29] Failed to call hook 'OnServerInitialized' on plugin 'VanishStatus v0.1.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.VanishStatus.IsInvisible (BasePlayer player) [0x00022] in <8734002a56ae4ca5859e17dc811b5c0b>:0 
  at Oxide.Plugins.VanishStatus.SendBar (BasePlayer player) [0x00010] in <8734002a56ae4ca5859e17dc811b5c0b>:0 
  at Oxide.Plugins.VanishStatus.InitPlayers () [0x00052] in <8734002a56ae4ca5859e17dc811b5c0b>:0 
  at Oxide.Plugins.VanishStatus.OnServerInitialized () [0x00056] in <8734002a56ae4ca5859e17dc811b5c0b>:0 
  at Oxide.Plugins.VanishStatus.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x004a9] in <8734002a56ae4ca5859e17dc811b5c0b>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <87ce9ac9776a48658bc55eae6debe38b>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cd7231f30b444d86bc6cca8a53cdd2ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cd7231f30b444d86bc6cca8a53cdd2ea>:0
[04.14 19:24:29] Loaded plugin Vanish Status v0.1.3 by IIIaKa
[04.14 19:24:29] [Image Library] Starting order VanishStatus
[04.14 19:24:29] Image batch (VanishStatus) has been stored successfully
[04.14 19:24:32] VanishStatus was compiled successfully in 1566ms

Vanish.json

Edited by Daemante
Daemante

Posted (edited)

Found and fixed the issue. There was a typo:

Original code: 

private bool IsInvisible(BasePlayer player)

        {

            if (Vanish != null) return (bool)Vanish.Call("IsInvisible2", player);

            if (BetterVanish != null) return (bool)BetterVanish.Call("_IsInvisible", player);

            return false;

        }


Fixed code:

private bool IsInvisible(BasePlayer player)

        {

            if (Vanish != null) return (bool)Vanish.Call("IsInvisible", player);

            if (BetterVanish != null) return (bool)BetterVanish.Call("_IsInvisible", player);

            return false;

        }

VanishStatus.cs

Edited by Daemante
Daemante

Posted

Appears this only works after a reload but doing /vanish in game again doesn't show the indicator.

IIIaKa

Posted

Changed Status from Pending to Not a Bug

IIIaKa

Posted

If you have anything to add, feel free to write in this thread.

Daemante

Posted

Ahhh I see. If that note about IsInvisible2 was always there then my apologies for not seeing/reading it. I will do as instructed. Thank you.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.4k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.