Jump to content

NRE on hook spamming console

Closed 1.0.9 1.1.0

Gt403cyl2
Gt403cyl2

Posted

Hey got this spamming my console....:
 

21:06 [Error] Failed to call hook 'OnEntityDeath' on plugin 'CustomItemDrops v1.0.9' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.CustomItemDrops.OnEntityDeath (BaseCombatEntity entity, HitInfo hitInfo) [0x000b5] in <d9cd96810fd94197be200df52ac0cf5d>:0 
  at Oxide.Plugins.CustomItemDrops.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0056e] in <d9cd96810fd94197be200df52ac0cf5d>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0

 

MACHIN3

Posted

can you tell me what was being killed at the time of this error?

Gt403cyl2

Posted

Not sure, but it was on a PVE server, it didn't happen on either of my PVP servers.
The players that were on at the time are gone, will see if I can replicate it...

Gt403cyl2

Posted

Yeah no luck replicating it yet...
Will keep an eye on it.

MACHIN3

Posted

I've been trying to replicate this myself on my test server with no luck. If you can catch it let me know and will do what I can to fix it

MACHIN3

Posted

Changed Status from Pending to Work in Progress

Gt403cyl2

Posted

Ok so I was able to catch it, player killed a boar with an LR-300
trying to recreate it myself that said I haven't been able to....
I'm sure it's something to do with it being a PVE server, as I have not seen a single instance on other servers....
NRE missed....

Only happened a couple times.... this time.
honestly weird.

MACHIN3

Posted

My test server is a PVE and honestly that shouldn't cause any issues with it. I am trying to see if this possibly happens due to an NPC killing something and it not ignoring it like it should. So far haven't been able to get this error myself.

Gt403cyl2

Posted

Yeah I don't know what to say...
I haven't been able to replicate it reliably.

MACHIN3

Posted

I will continue to look into this and hopefully come up with something. If you determine anything let me know. For now will list this as gremlins lol

MACHIN3

Posted

Changed Status from Work in Progress to Gremlins

Gt403cyl2

Posted

Still haven't replicated it but now have seen it happen on my PVP server as well.
so there's that.

Gt403cyl2

Posted

Yeah been sitting back watching what is going on when the error comes up and it happened again when a player killed a bear/boar but with an ice ak this time, yeah and a wolf just now too.

Bear, Boar Wolf in that order...

 

20:28 [Error] Failed to call hook 'OnEntityDeath' on plugin 'CustomItemDrops v1.0.9' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.CustomItemDrops.OnEntityDeath (BaseCombatEntity entity, HitInfo hitInfo) [0x000b5] in <74662077e5af457c894335f60058db50>:0 
  at Oxide.Plugins.CustomItemDrops.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0056e] in <74662077e5af457c894335f60058db50>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0 
20:29 [Error] Failed to call hook 'OnEntityDeath' on plugin 'CustomItemDrops v1.0.9' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.CustomItemDrops.OnEntityDeath (BaseCombatEntity entity, HitInfo hitInfo) [0x000b5] in <74662077e5af457c894335f60058db50>:0 
  at Oxide.Plugins.CustomItemDrops.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0056e] in <74662077e5af457c894335f60058db50>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0 
20:30 [Error] Failed to call hook 'OnEntityDeath' on plugin 'CustomItemDrops v1.0.9' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.CustomItemDrops.OnEntityDeath (BaseCombatEntity entity, HitInfo hitInfo) [0x000b5] in <74662077e5af457c894335f60058db50>:0 
  at Oxide.Plugins.CustomItemDrops.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0056e] in <74662077e5af457c894335f60058db50>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <bae5f1223fce49c493b01571c99dce02>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <bae5f1223fce49c493b01571c99dce02>:0


 

MACHIN3

Posted (edited)

Did the player have permission to earn a drop and if so are they set to default drop chance or VIP drop chance?

Also what are your current settings?

Edited by MACHIN3
Gt403cyl2

Posted

Yes, default group has base perm and no they were not vip.
Here is the config:
 

{
  "General Settings": {
    "showchatmessage": true
  },
  "Gathering Options / List": {
    "dropchance": 1,
    "vipdropchance": 3,
    "trees": true,
    "berries": true,
    "wood": true,
    "stones": true,
    "ore": true,
    "hemp": true,
    "mushrooms": true,
    "pumpkins": true,
    "corn": true,
    "potatos": true,
    "gatheringItemList": {
      "0": {
        "shortname": "apple",
        "displayname": "",
        "amount": 3,
        "SkinID": 0
      },
      "1": {
        "shortname": "bandage",
        "displayname": "",
        "amount": 3,
        "SkinID": 0
      },
      "2": {
        "shortname": "healingtea.advanced",
        "displayname": "",
        "amount": 1,
        "SkinID": 0
      },
      "3": {
        "shortname": "maxhealthtea.advanced",
        "displayname": "",
        "amount": 1,
        "SkinID": 0
      },
      "4": {
        "shortname": "woodtea.advanced",
        "displayname": "",
        "amount": 1,
        "SkinID": 0
      }
    }
  },
  "Mining Options / List": {
    "dropchance": 1,
    "vipdropchance": 3,
    "miningItemList": {
      "0": {
        "shortname": "metal.fragments",
        "displayname": "",
        "amount": 5,
        "SkinID": 0
      },
      "1": {
        "shortname": "metal.refined",
        "displayname": "",
        "amount": 2,
        "SkinID": 0
      },
      "2": {
        "shortname": "oretea.advanced",
        "displayname": "",
        "amount": 1,
        "SkinID": 0
      }
    }
  },
  "Looting Options / List": {
    "dropchance": 1,
    "vipdropchance": 3,
    "lootcontainer": true,
    "freeablelootcontainer": true,
    "lockedbyentcrate": true,
    "hackablelockedcrate": true,
    "lootingItemList": {
      "0": {
        "shortname": "scrap",
        "displayname": "",
        "amount": 5,
        "SkinID": 0
      },
      "1": {
        "shortname": "metal.fragments",
        "displayname": "",
        "amount": 10,
        "SkinID": 0
      },
      "2": {
        "shortname": "scraptea",
        "displayname": "",
        "amount": 1,
        "SkinID": 0
      }
    }
  },
  "Animal Kill Options / List": {
    "dropchance": 1,
    "vipdropchance": 3,
    "chicken": true,
    "boar": true,
    "stag": true,
    "wolf": true,
    "bear": true,
    "polarbear": true,
    "horse": true,
    "shark": true,
    "AnimalItemList": {
      "0": {
        "shortname": "leather",
        "displayname": "",
        "amount": 3,
        "SkinID": 0
      },
      "1": {
        "shortname": "fat.animal",
        "displayname": "",
        "amount": 5,
        "SkinID": 0
      }
    }
  },
  "NPC Kill Options / List": {
    "dropchance": 1,
    "vipdropchance": 3,
    "scientist": true,
    "dweller": true,
    "bradley": true,
    "heli": true,
    "scarcrow": true,
    "customnpc": true,
    "zombie": true,
    "NPCItemList": {
      "0": {
        "shortname": "ammo.pistol",
        "displayname": "",
        "amount": 10,
        "SkinID": 0
      },
      "1": {
        "shortname": "ammo.rifle",
        "displayname": "",
        "amount": 5,
        "SkinID": 0
      }
    }
  },
  "Player Kill Options / List": {
    "dropchance": 10,
    "vipdropchance": 20,
    "enableplayers": true,
    "PlayerItemList": {
      "0": {
        "shortname": "scrap",
        "displayname": "",
        "amount": 2,
        "SkinID": 0
      },
      "1": {
        "shortname": "metal.fragments",
        "displayname": "",
        "amount": 1,
        "SkinID": 0
      }
    }
  }
}

 

MACHIN3

Posted

This is my long work week so I'll look into more when I get the chance and hopefully get this resolved 

MACHIN3

Posted

Changed Status from Gremlins to Work in Progress

MACHIN3

Posted (edited)

I have been trying to get this to happen for me with no luck, it awards an item when killing animals. I even tried with the ICE AK 😖

TEST.jpg

 

Edited by MACHIN3
MACHIN3

Posted (edited)

I even copied your config to mine and no luck but I notice you have your drop chance and vipchance set to 1 and 3..
"dropchance": 1, "vipdropchance": 3, 

With that you have a 1% chance (1 out of ever 100) for it to even call to drop an item which I didn't notice till I killed like 20 boar and never once got a drop so I had to check lol. But still not getting any errors. 

TEST2.jpg

 

Edited by MACHIN3
MACHIN3

Posted

I have a beta version in our discord that will possible fix this issue now

Gt403cyl2

Posted

Thanks for the updates, yeah I know the odds are pretty low, it's done on purpose.
 

MACHIN3

Posted

Changed Status from Work in Progress to Closed

Changed Fixed In to Next Version

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.