ID:147105
 
mob
Commander
icon='grass.dmi'
icon_state="com"
density=1
Enter(atom/movable/A)
if(ismob( A ))
var/mob/M = A
A<<"We have contact with the enemy,Follow the path to reach them."
A.verbs += /mob/verb/Meele
A.verbs += /mob/verb/Shoot
A.loc=locate(7,4,4)
A.frozen=1
A.icon_state="hurt"
A.contents += new /obj/Assault_Rifle/
A.icon_state="sol"
A.frozen=0

Ummm can someone tell me why it's undefined?
Nothing is undefined, but you did over-intent:

mob
Commander
icon='grass.dmi'
icon_state="com"
density=1
Enter(atom/movable/A)
if(ismob( A ))
var/mob/M = A
A<<"We have contact with the enemy,Follow the path to reach them."
A.verbs += /mob/verb/Meele
A.verbs += /mob/verb/Shoot
A.loc=locate(7,4,4)
A.frozen=1
A.icon_state="hurt"
A.contents += new /obj/Assault_Rifle/
A.icon_state="sol"
A.frozen=0

It's highly unlikely that you'll be Enter()ing a mob, unless if you specifically call Move(), in which case you should just call another proc directly. Maybe you meant to use Bumped() (which you have to write yourself, search the forums for it).