ID:262606
 
Code:
Attack(mob/A as mob/enemy in oview(1))
damage = src.attack - A.defense
if(damage > 0)
A.health -= damage
src << "You hit [A] for [damage] damage."
A.enemydeath()
else
src << "You hit [A] for absolutely no damage!"


Problem description:
error: input type (mob/enemy) must be atomic (area, turf, obj, or mob).
Isn't mob/enemy a mob and are not mobs atomic?

Try:
Attack(mob/Enemy/A in oview(1))
damage = src.attack - A.defense
if(damage > 0)
A.health -= damage
src << "You hit [A] for [damage] damage."
A.enemydeath()
else
src << "You hit [A] for absolutely no damage!"




I don't think you can assign mob/enemy to the as operator.

It's either as mob, as obj, and so on.
In response to Blakdragon77
You also indented too much.
Attack(var/mob/Enemy/A in oview(1))
damage = src.attack - A.defense
if(damage > 0)
A.health -= damage
src << "You hit [A] for [damage] damage."
A.enemydeath()
else
src << "You hit [A] for absolutely no damage!"


Also, you might want to think about using the get_step() procedure. (so you have to face your enemy (more realistic))

just a thought on that.
In response to Crzylme
Instead of get_step() if you want dir, you should use get_dir().