Attempt to index local 'dmginfo'

I am making an entity that reduces explosion damage when you own it, but I get lua errors whenever I encounter explosion damage such as an incendinary grenade or C4 (this is for TTT). I have little experience in dmginfo and would appreciate some help on whats going wrong here

My code

local function ScalePlayerDamage(ply, hitgroup, dmginfo)
--**Line 25 is below**   
if dmginfo:IsExplosionDamage() and ply:HasEquipmentItem(EQUIP_FLAK) then

hook.Add("PlayerHurt", "TonyStarkWouldBeJealous", function( ply, hitgroup, dmginfo )
	ScalePlayerDamage( ply, hitgroup, dmginfo )

The error

[ERROR] addons/lua/autorun/exho_flakjacket.lua:25: attempt to index local 'dmginfo' (a number value)
  1. ScalePlayerDamage - addons/lua/autorun/exho_flakjacket.lua:25
   2. v - addons/s/lua/autorun/exho_flakjacket.lua:32
    3. unknown - lua/includes/modules/hook.lua:84
     4. TakeDamageInfo - [C]:-1
      5. RadiusDamage - gamemodes/terrortown/entities/entities/ttt_flame.lua:112
       6. unknown - gamemodes/terrortown/entities/entities/ttt_flame.lua:185

PlayerHurt uses different arguments.

[editline]8th June 2014[/editline]

I am assuming you want to replace it with