For some reason when a person leaves the game while holding the chat key they always seem to popup the same error that the entity returns null.
Any help? I tried ending the function if it returns null but it just breaks it.
tcolor = team.GetColor(self.ply:Team())
tcol = Color( tcolor.r,tcolor.g,tcolor.b,100 )
if ( !IsValid( self.ply ) ) then return end
if ( !self.ply:Alive() ) then
draw.RoundedBox( 4, 0, 0, w, h, Color( 0, 0, 0, 100 ) )
return
end
draw.RoundedBox( 4, 0, 0, w, h, tcol )
And I can never seem to fix the error when I am creating a HUD I try to draw the players health but when the player dies it just said clip1 return null value.