Jump to content

Failed to call hook 'OnHelicopterDropCrate' on plugin 'BetterNpc v1.3.1'

Pending 1.3.1

Kobani
Kobani

Posted

The following error occurs when a supply signal is called up.
It occurs exactly at the moment when the drop is dropped from the airplane. It seems to affect all drops.
I hope you can fix this error. Because it is currently also causing VehicleAirdrops to sporadically not work.
Here is the error message from the console:

Failed to call hook 'OnHelicopterDropCrate' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'CH47' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
at Oxide.Plugins.BetterNpc.OnHelicopterDropCrate (CH47HelicopterAIController ai) [0x00000] in <5b33c838c7d447178243da7c4c429803>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x007f6] in <5b33c838c7d447178243da7c4c429803>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

 

Jbird

Posted

On 12/11/2024 at 7:17 AM, Kobani said:

The following error occurs when a supply signal is called up.
It occurs exactly at the moment when the drop is dropped from the airplane. It seems to affect all drops.
I hope you can fix this error. Because it is currently also causing VehicleAirdrops to sporadically not work.
Here is the error message from the console:

Failed to call hook 'OnHelicopterDropCrate' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'CH47' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
at Oxide.Plugins.BetterNpc.OnHelicopterDropCrate (CH47HelicopterAIController ai) [0x00000] in <5b33c838c7d447178243da7c4c429803>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x007f6] in <5b33c838c7d447178243da7c4c429803>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

What happens with VehicleAirdrops where it is not working? What generally happens is one or even more than one other plugin are using the same hook, and we have seen often where the error is harmless and because of this. But if it is causing issues please let us know anything that is not working.

Also can you share your chinook file when you get a chance? You can jump in the Mad Mapper Discord if you'd like to do so more privately.

Kobani

Posted (edited)

I have observed once that it is not triggered by Vehicle Airdrops and the problem with Vehicle Airdrops was caused by another plugin.

I have now followed it up and seen another message and now I know exactly what is causing the following error messages. It happens with the facepunch events Airdrop and CH47 (Locket Crate

The following message always appears when the cargo plane drops the Crate:
 

Failed to call hook 'OnSupplyDropDropped' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'AirDrop' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
at Oxide.Plugins.BetterNpc.OnSupplyDropDropped (SupplyDrop supplyDrop, CargoPlane cargoPlane) [0x0002f] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00304] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

and this message always appears when the CH47 drops the Locket Crate:
 

Failed to call hook 'OnHelicopterDropCrate' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'CH47' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
at Oxide.Plugins.BetterNpc.OnHelicopterDropCrate (CH47HelicopterAIController ai) [0x00000] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x007f6] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

The messages always appear directly when the crates are dropped.
I hope this helps you to avoid these messages.

Edited by Kobani
Jbird

Posted

16 hours ago, Kobani said:

I have observed once that it is not triggered by Vehicle Airdrops and the problem with Vehicle Airdrops was caused by another plugin.

I have now followed it up and seen another message and now I know exactly what is causing the following error messages. It happens with the facepunch events Airdrop and CH47 (Locket Crate

The following message always appears when the cargo plane drops the Crate:
 

Failed to call hook 'OnSupplyDropDropped' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'AirDrop' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
at Oxide.Plugins.BetterNpc.OnSupplyDropDropped (SupplyDrop supplyDrop, CargoPlane cargoPlane) [0x0002f] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00304] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

and this message always appears when the CH47 drops the Locket Crate:
 

Failed to call hook 'OnHelicopterDropCrate' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'CH47' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
at Oxide.Plugins.BetterNpc.OnHelicopterDropCrate (CH47HelicopterAIController ai) [0x00000] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x007f6] in <a2a3115a857c4245b5ec41d1e91859c3>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

The messages always appear directly when the crates are dropped.
I hope this helps you to avoid these messages.

Do you have any plugins regarding those drops? Like FancyDrop I think it's called, or anything like it? Generally the only two reasons those errors occur are because another plugin(s) are using the hook too, or because a folder or file (or more than one) are missing.

Are there any problems with those drops? Do you have them enabled in config and are they working when they drop?

In nearly all of the instances where those errors occur it is generally harmless.

Kobani

Posted

I understand. I will continue to observe it.

 

Jbird

Posted

Sounds like a plan just let me know.

Watcher

Posted

Same console message on my server.

Failed to call hook 'OnHelicopterDropCrate' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'CH47' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <f98723dd4586469db5213ec59da723ca>:0
at Oxide.Plugins.BetterNpc.OnHelicopterDropCrate (CH47HelicopterAIController ai) [0x00000] in <fcdde344e7de45a8ae116425712e561f>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x007f6] in <fcdde344e7de45a8ae116425712e561f>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

Kobani

Posted

1 hour ago, Watcher said:

Same console message on my server.

Failed to call hook 'OnHelicopterDropCrate' on plugin 'BetterNpc v1.3.1' (KeyNotFoundException: The given key 'CH47' was not present in the dictionary.)
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <f98723dd4586469db5213ec59da723ca>:0
at Oxide.Plugins.BetterNpc.OnHelicopterDropCrate (CH47HelicopterAIController ai) [0x00000] in <fcdde344e7de45a8ae116425712e561f>:0
at Oxide.Plugins.BetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x007f6] in <fcdde344e7de45a8ae116425712e561f>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <206a0f2c6ee141f38e2ad549cde44d70>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <beb2b64691c64e2b95b99491bd85442c>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <beb2b64691c64e2b95b99491bd85442c>:0

Do you also use VehicleAirdrops or something similar?

 

Watcher

Posted

2 hours ago, Kobani said:

Do you also use VehicleAirdrops or something similar?

 

AirfieldEvent

Kobani

Posted (edited)

Hello, I now know exactly what causes these messages.
It happens when in the directory data/BetterNpc/Events/
the files AirDrop.json and CH47.json are missing.
You should not delete the files if you don't need them but set them to false.
 

Edited by Kobani
Jbird

Posted

5 hours ago, Kobani said:

Hello, I now know exactly what causes these messages.
It happens when in the directory data/BetterNpc/Events/
the files AirDrop.json and CH47.json are missing.
You should not delete the files if you don't need them but set them to false.

Yes this or sometimes other missing files can cause this type of error or issue, or NPCs that come after that in the loading process have issues or do not load.

Glad you were able to find that and fix it. I had asked before if they were enabled so I am sorry I didn't emphasize that to help you find it quicker.

Jbird

Posted

On 12/20/2024 at 8:51 AM, Watcher said:

AirfieldEvent

Other events that use the same hook sometimes cause those errors to occur, but if there is no problem with the spawning of NPCs if the file is enabled, that is where there is an issue. Sometimes the error is not actually a problem. But if it is would you do me a favor and start another ticket so we can consider this one resolved, and the other member is not getting notifications in case we have more to discuss for your issue.

  • Like 1
Jbird

Posted

15 minutes ago, Kobani said:

Ok 

One of those messages was for the other person posting in the ticket by the way just making sure you saw that. 🍻

Jbird

Posted

On 12/23/2024 at 4:21 AM, Watcher said:

ok for me too!

🍻

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.4k

Files Sold

Total number of files sold.

2.4m

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.