Why doesn't this work?

Code:

ACTION Player
...
ent_create("knife.mdl",my.x,attach_weapon);
if(my.health <= 0){ent_remove("knife.mdl");}
...