Jump to content

Failed to call hook....

Pending 2.1.2

Hawkhill
Hawkhill

Posted

Hi!
After updating both NPC Spawn and BetterNpc, i got spammed in console with hook error from the HealthyGuns plugin.
This happends each time BetterNpc is reloaded.
BetterNpc / NpcSpawn seems to be working fine tho.

 

[BetterNpc] Plugin loading progress at 58%
[BetterNpc] Plugin loading progress at 74%
[BetterNpc] Plugin loading progress at 82%
[BetterNpc] Plugin loading progress at 85%
[BetterNpc] Plugin loading progress at 90%
[BetterNpc] Plugin loading progress at 92%
[BetterNpc] All spawn groups have been successfully filled!
[BetterNpc] Plugin loading progress at 96%
[BetterNpc] All puzzles have been successfully reset!
[BetterNpc] Completed plugin initialization successfully!
Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.HealthyGuns.RepairContainerContents (LootContainer container) [0x00006] in <083f0d1587ac4198bcf3deb91854aa16>:0 
  at Oxide.Plugins.HealthyGuns+<>c__DisplayClass4_0.<OnLootSpawn>b__0 () [0x00000] in <083f0d1587ac4198bcf3deb91854aa16>:0 
  at Oxide.Core.OxideMod.OnFrame (System.Single delta) [0x00051] in <15f61ddda771464d8246ebdce8ff4811>:0 

aimacak

Posted

5 hours ago, Hawkhill said:

Hi!
After updating both NPC Spawn and BetterNpc, i got spammed in console with hook error from the HealthyGuns plugin.
This happends each time BetterNpc is reloaded.
BetterNpc / NpcSpawn seems to be working fine tho.

 

[BetterNpc] Plugin loading progress at 58%
[BetterNpc] Plugin loading progress at 74%
[BetterNpc] Plugin loading progress at 82%
[BetterNpc] Plugin loading progress at 85%
[BetterNpc] Plugin loading progress at 90%
[BetterNpc] Plugin loading progress at 92%
[BetterNpc] All spawn groups have been successfully filled!
[BetterNpc] Plugin loading progress at 96%
[BetterNpc] All puzzles have been successfully reset!
[BetterNpc] Completed plugin initialization successfully!
Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.HealthyGuns.RepairContainerContents (LootContainer container) [0x00006] in <083f0d1587ac4198bcf3deb91854aa16>:0 
  at Oxide.Plugins.HealthyGuns+<>c__DisplayClass4_0.<OnLootSpawn>b__0 () [0x00000] in <083f0d1587ac4198bcf3deb91854aa16>:0 
  at Oxide.Core.OxideMod.OnFrame (System.Single delta) [0x00051] in <15f61ddda771464d8246ebdce8ff4811>:0 

Hello, i cant reproduce it, but may be its related with 2 parameters in BetterNpc (i tried with both true):
 

"Run the debug.puzzlereset command when the plugin loads or reloads to refresh puzzles, IO, and NPCs at Facepunch monuments [true/false]": true,
"Refresh NPCs and crates at monuments when the plugin loads or reloads? [true/false]": true,

You can also try to change this method in Healthy Guns for yourself and check if the error remains, if it helps you, you can create a ticket on umod with a request to add it to the official version.

        private void RepairContainerContents(LootContainer container)
        {
            if (container == null || container.inventory == null) return;
			
            foreach (Item item in container.inventory.itemList)
            {
                if (item != null && item.hasCondition && item.condition != item.info.condition.max && ItemOfCategory(item, ItemCategory.Weapon))
                    item.condition = item.info.condition.max;
            }
        }
  • Like 1
Hawkhill

Posted

Both values are set to true already.

In HealthyGuns plugin..... Do i just add this line?

if (container == null || container.inventory == null) return;

aimacak

Posted (edited)

7 minutes ago, Hawkhill said:

Both values are set to true already.

In HealthyGuns plugin..... Do i just add this line?

if (container == null || container.inventory == null) return;

Yeah, and to check if this will help you, please give feedback)

Edited by aimacak
Hawkhill

Posted

Posted your sollution in the support section of HealthyGuns on uMod.
See if the author will update it.
Thanks for your help

2.2m

Downloads

Total number of downloads.

10.3k

Customers

Total customers served.

149k

Files Sold

Total number of files sold.

3.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.