Give an entity some health and take some OnTake Damage

I am trying to give an entity some health and lose some when shot at

function ENT:OnTakeDamage(dmg)

    self:TakePhysicsDamage(dmg); -- React physically when getting shot/blown
    if(self:Health <= 0) then return; end -- If the health-variable is already zero or below it - do nothing
    self:Health = self:Health - dmg:GetDamage(); -- Reduce the amount of damage took from our health-variable
    if(self:Health <= 0) then -- If our health-variable is zero or below it
        self:Remove(); -- Remove our entity

It does not like the

part. Seems to think its nil.

Its currently set on Initialize

function ENT:Initialize()
    self:PhysicsInit( SOLID_VPHYSICS )      -- Make us work with physics,
    self:SetMoveType( MOVETYPE_VPHYSICS )   -- after all, gmod is a physics
    self:SetSolid( SOLID_VPHYSICS )         -- Toolbox

Whats going on? Why is health nil after being set?

self:Health = self:Health - dmg:GetDamage();
should be
self:SetHealth( self:Health() - dmg:GetDamage() );

if(self:Health <= 0)

should be self:Health()

Wow… I really am dumb tonight…

I program PHP for a living but come Saturday all the brackets go out the window!

Thanks for the help! Time for bed me thinks!