1. With the latest build of Oxide it seems that the setup I have for OnEntityDeath is now broken, I'm not 100% sure why and maybe it's just the setup I am using.
    It seems like Walls, Barricades, and when a server removes extra animal entities from the map the Hook throws a NullPointerException, Even with checks that say if the entities are not players then to just return false out the Exception sends.

    The return being mainly:
    Code:
    NullReferenceException: Object reference not set to an instance of an object
    I've even attempted to instead of checking with my main if to make this check it's own return like so:
    Code:
    attacker = hitinfo.Initiator;
    victim = entity;
    if (!attacker.ToPlayer() || !victim.ToPlayer()) return false;
    
    However it still seems that this issue is slipping through the cracks anyway. Am I approaching this incorrectly? Even if the items sent back to the OnEntityDeath are not an object that means they should still fail the above check and stop the process.
     
  2. Check if attacker is undefined or null
     
  3. The OnEntityDeath hook hasn't changed in months, keep in mind that hitinfo can be null (which is also mentioned in the docs).
     
  4. After what what hatemail said I literally just remembered that could be the case, (but since this is the first time it's started pop up I guess it slipped my mind) thanks guys.