Failed to call hook 'OnEntityTakeDamage'

I'm not sure if something is broken or not, but this error appears very often.

Failed to call hook 'OnEntityTakeDamage' on plugin 'TruePVE v2.4.8' (NullReferenceException: Object reference not set to an instance of an object)
  at UnityEngine.GameObjectEx.ToBaseEntity (UnityEngine.GameObject go, System.Boolean allowDestroyed) [0x00000] in <ba6272a5951747a68986252fad12d96e>:0 
  at BaseNetworkable.LookupPrefab () [0x00011] in <ba6272a5951747a68986252fad12d96e>:0 
  at Oxide.Plugins.TruePVE.GetTypeName (BaseEntity entity, System.String defaultValue) [0x00020] in <89f6542a0b09469a89da30e348c3aef3>:0 
  at Oxide.Plugins.TruePVE+Configuration.ResolveEntityGroups (BaseEntity entity) [0x0004e] in <89f6542a0b09469a89da30e348c3aef3>:0 
  at Oxide.Plugins.TruePVE.EvaluateRules (BaseEntity entity, BaseEntity attacker, Oxide.Plugins.TruePVE+RuleSet ruleSet, System.Boolean returnDefaultValue) [0x0000d] in <89f6542a0b09469a89da30e348c3aef3>:0 
  at Oxide.Plugins.TruePVE.AllowDamage (BaseEntity entity, HitInfo info) [0x01ede] in <89f6542a0b09469a89da30e348c3aef3>:0 
  at Oxide.Plugins.TruePVE.OnEntityTakeDamage (BaseEntity entity, HitInfo info) [0x00016] in <89f6542a0b09469a89da30e348c3aef3>:0 
  at Oxide.Plugins.TruePVE.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00d98] in <89f6542a0b09469a89da30e348c3aef3>: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 <db058accaef24d86af67c0d18d641acb>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <db058accaef24d86af67c0d18d641acb>:0​

hi, you need to update your npc plugins such as NpcSpawn, ZombieHorde, RaidableBases and DangerousTreasures.

All these plugins have been updated. But apparently something is wrong with the update.

if you have ZombieHorde you need to update ChaosNPC extension. chaosnpc.update is the command. it is better to restart to update that extension.

the above error can only appear if a prefabID is 0, so it is caused by an out of date plugin or extension

nivex

if you have ZombieHorde you need to update ChaosNPC extension. chaosnpc.update is the command. it is better to restart to update that extension.

the above error can only appear if a prefabID is 0, so it is caused by an out of date plugin or extension

No, I don't have that. I use BetterNpc, Convoy, ArmoredTrain, HarbobEvent, WaterEvent. All these plugins have been updated, but apparently they made a mistake in updating, we are waiting for KpucTaJl to appear online.

all of those plugins use NpcSpawn which has already been fixed. unload each and see if the error stops. if it doesn't stop then it's not those plugins.

I have the same error and I have all updated.

It started from a raidbase spawn



Merged post

[RaidableBases] raideasy37 @ H2 (-399.62 1,099.34) : 12 items

(16:44:21) | Failed to call hook 'OnEntitySpawned' on plugin 'TruePVE v2.4.8' (NullReferenceException: Object reference not set to an instance of an object)

at UnityEngine.GameObjectEx.ToBaseEntity (UnityEngine.GameObject go, System.Boolean allowDestroyed) [0x00000] in <450dba6ab436465f9ae56ca635ad1e99>:0

at BaseNetworkable.LookupPrefab () [0x00011] in <450dba6ab436465f9ae56ca635ad1e99>:0

at Oxide.Plugins.TruePVE.GetTypeName (BaseEntity entity, System.String defaultValue) [0x00020] in <b81ba37b94294897b14f4a354daa8faa>:0

at Oxide.Plugins.TruePVE.OnEntitySpawned (ContainerIOEntity container) [0x00041] in <b81ba37b94294897b14f4a354daa8faa>:0

at Oxide.Plugins.TruePVE.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01077] in <b81ba37b94294897b14f4a354daa8faa>: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 <db058accaef24d86af67c0d18d641acb>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <db058accaef24d86af67c0d18d641acb>:0

(16:44:21) | PrefabID is 0! assets/content/vehicles/boats/cargoship/cargoshiptest.prefab/assets/content/props/sentry_scientists/sentry.scientist.static.prefab

hi, RaidableBases was already updated to fix this issue.

PrefabID is 0 makes it clear that you have a plugin that needs to be fixed still

I've hidden the GetTypeName NullReferenceException error in 2.4.9, but that will not fix your issues. Update your plugins when an update becomes available.

nivex

hi, RaidableBases was already updated to fix this issue.

PrefabID is 0 makes it clear that you have a plugin that needs to be fixed still

I've hidden the GetTypeName NullReferenceException error in 2.4.9, but that will not fix your issues. Update your plugins when an update becomes available.

It wasn't just about updating plugins. In my case, one of the errors somehow remained after the first restart of the server. The errors disappeared only after restarting the server again.