I have looked at other posts on this and they're not useful, this is my code but it seems to still want to give me the error, I mean it still calls the function but it says the error and it's quite annoying having it pop up every 2 seconds. I have also tried just doing 'private void' instead of object and still same error.
object OnEntityTakeDamage(BaseCombatEntity entity, HitInfo info)
{
if (entity == null || info == null) return null;
BasePlayer player = entity as BasePlayer;
SendChatMessage(player, info.Weapon.name);
SendChatMessage(player, info.HitEntity.name);
return true;
}