Im pretty sure I never wrote any code for damaging units in some area.
What do you mean by not working? Throwing error, not doing the damage?
I see you're hooking some function DamageArea, (I dont know where you're hooking it from), but you're not really calling it.
What you probably need, (or how I'd do it) is to ForkThread a new function that will periodically call the function that does the damage.