Jump to content

Casket stack issue

Pending 2.0.7

Pahuan
Pahuan

Posted

When opening a casket, the following error appears in the console.
And if there is a stack of caskets (for example 5), when trying to open one, two caskets are consumed at once, leaving only 3 in the stack.

Failed to call hook 'OnItemAction' on plugin 'FishingTreasure v2.0.7' (NullReferenceException: Object reference not set to an instance of an object)
 at Oxide.Plugins.FishingTreasure.OpenCasket (BasePlayer player) [0x0003f] in <c3fe4d586ae24a92816b187b3fac9958>:0
 at Oxide.Plugins.FishingTreasure.OnItemAction (Item item, System.String action, BasePlayer player) [0x00060] in <c3fe4d586ae24a92816b187b3fac9958>:0
 at Oxide.Plugins.FishingTreasure.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00653] in <c3fe4d586ae24a92816b187b3fac9958>:0
 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0
 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <112d89ea5d3348c8b949af0ab1a866d2>:0
 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <112d89ea5d3348c8b949af0ab1a866d2>:0


Could you share an example of a working configuration with some values filled in?

  • Curator
imthenewguy

Posted

Hey mate I have tested this config and it seems to be working ok. 
What platform are you using: oxide or carbon?

Unload FishingTreasure, delete it from data/lang, overwrite your config with this one, and load it back up. 

Let me know what the result is.

The fact that it is consuming 2 items at a time, leads me to believe it is a conflict with another plugin that is monitoring the OnItemAction hook though.

 

FishingTreasure.json

Pahuan

Posted

Everything’s fine - your config works.
It just means that when the plugin is loaded for the first time, it generates a config file that causes errors.
I’m using uMod.

  • Curator
imthenewguy

Posted

The above copy was the default config I believe.

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.4m
Total downloads
Customers
10.8k
Customers served
Files Sold
156.1k
Marketplace sales
Payments
3.3m
Processed total
×
×
  • 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.