Jump to content

Error

Pending 2.1.7

QueenLuckyshot
QueenLuckyshot

Posted

Sometimes i get this error;

Failed to call hook 'OnEntityTakeDamage' on plugin 'BossMonster v2.1.7' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.BossMonster.OnEntityTakeDamage (ScientistNPC entity, HitInfo info) [0x00020] in <6f374e7381eb4662851436f176959a3b>:0
at Oxide.Plugins.BossMonster.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00998] in <6f374e7381eb4662851436f176959a3b>: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 <15f61ddda771464d8246ebdce8ff4811>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0

Can someone help me?

aimacak

Posted

5 hours ago, QueenLuckyshot said:

Sometimes i get this error;

Failed to call hook 'OnEntityTakeDamage' on plugin 'BossMonster v2.1.7' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.BossMonster.OnEntityTakeDamage (ScientistNPC entity, HitInfo info) [0x00020] in <6f374e7381eb4662851436f176959a3b>:0
at Oxide.Plugins.BossMonster.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00998] in <6f374e7381eb4662851436f176959a3b>: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 <15f61ddda771464d8246ebdce8ff4811>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0

Can someone help me?

Hello, try it from another ticket:
https://codefling.com/files/sc/26309-error/#findComment-130804
 

Find this method in BossMonster.cs and paste these 2 lines, 1 commented with the standard code, the second is an assumed fix (in my example, the final version that you should get), then restart the plugin.

 

        private object OnEntityTakeDamage(ScientistNPC entity, HitInfo info)
        {
            //if (entity == null || info == null) return null;
            if (entity == null || info == null || entity.net == null) return null;
            if (_controllers.ContainsKey(entity.net.ID.Value))
            {



And if it doesn't bother you, try to provide as much information as possible, under what circumstances it appeared or any other details that you can relate to it by time, it's not always just one mistake without any comments that you can understand something, thank you 🙂

QueenLuckyshot

Posted

 

Hey, thanks for helping. I gonna try what you said. I have very little information about what's wrong. It happens randomly, and I see chinooks stuck in the air. When I try to remove them, the console says they're already gone. Because chinooks are stuck, I know something's wrong. When I checked the console, I saw the Boss Monster error. It gonna take a while to see if it works, because even when I reload it, there's no error.

2.2m

Downloads

Total number of downloads.

10.3k

Customers

Total customers served.

149.5k

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.