I'd recommend using events instead of c_scan. It is cleaner that way, and events are a feature hard-wired into Lite-C that accomplish the same purpose you're trying to here.
In the spells's function before the while loop:
my.emask |= ENABLE_ENTITY;
my.event = hit_enemy; // or some other function name--WITHOUT the ()
Now you write a small function called hit_enemy that subtracts the damage from the enemy, and erase the c_scan line in your enemy's function, as the event function will take care of everything.
Also,
please, especially when posting long code chunks, use the [ code ] [/ code ] tags (without the spaces of course). It is very hard to read code that isn't formatted correctly, especially very long sections like this.

Let me know if the events work/don't work, or if you need any clarification.