How exactly does this function work? What i'm trying to do is get the damage inflicted on the target entity with all notifications of specific a damage type and return that number to the source entity.
What you want to do seems to be what the thorn status effect does? /stats/effects/thorns/thorns.lua uses it Basically it returns an array of damage notifications that contain what the usual damageRequest contain; http://starbounder.org/Modding:Lua/Starbound_Datatypes#damageRequest
Ah, from "get the damage inflicted on the target entity with all notifications of specific a damage type and return that number to the source entity" I thought what you meant was to reflect the damages or something like that