no errors or arguements anymore, and the enemy is alive, but he doesnt respond at all when i run into him, matter of fact, he is passable. also, he doesnt die, i shot him over a hundred times, but no affect. here is the code with the corrections.

Code:
var enemy_distance; // moves the enemy
var distance;
define sword_base = skill12; // using skill12, 13, 14 to store the sword_base coords
define sword_tip = skill15; // using skill15, 16, 17 to store the sword_tip coords
define healthpoints = skill18; // just another name for skill18
entity* enemy;
action enemy_fight // attached to the enemy
{
while(plBiped01_entity==null){wait(1);}
distance = vec_dist (my.x, plBiped01_entity.x);
my.healthpoints = 100;
while(!plBiped01_entity) { wait(1); } // wait until the player exists
while(my.healthpoints > 0)
{
if (distance < 200) // the player approaches the enemy
{
vec_set(temp, plBiped01_entity.x);
vec_sub(temp, my.x);
vec_to_angle(my.pan, temp);
my.tilt = 0; // I'm a maniac :)
enemy_distance.x = 5 * time_step;
enemy_distance.y = 0;
enemy_distance.z = 0;
ent_move(enemy_distance, nullvector);
ent_animate(me,"walk", my.skill19, ANM_CYCLE); // play walk frames animation
my.skill19 += 5 * time_step; // "walk" animation speed
if (my.skill19 > 100) {my.skill19 = 0;} // loop animation
if (vec_dist (my.x, plBiped01_entity.x) < 50) // if the player comes closer than 50 quants attack him
{
my.skill20 = 0; // reset "attack" frames
while (my.skill20 < 100)
{
ent_vertex(my.sword_tip, 291); // sword tip vertex coords - get the value in Med
ent_vertex(my.sword_base, 306); // sword base vertex coords - get the value in Med
trace_mode = ignore_me + ignore_passable;
trace (my.sword_base, my.sword_tip); // trace between these sword positions
if (result != 0) // hit something, could be the player or another enemy
{
if (you != null) {you.healthpoints -= 4 * time_step;
} }
ent_animate(me,"attack", my.skill20, ANM_CYCLE); // play attack frames animation
my.skill20 += 5 * time_step; // "attack" animation speed
wait (1);
}
wait (6); // slows down the enemy and reduces the number of traces per second
}
}
else // the player is farther than 200 quants away
{
ent_animate(me,"stand", my.skill21, ANM_CYCLE); // play stand frames animation
my.skill21 += 2 * time_step; // "stand" animation speed
if (my.skill21 > 100) {my.skill21 = 0;} // loop animation
}
wait (1);

while (my.skill22 < 80) // the enemy is dead
{
ent_animate(me,"death", my.skill22, ANM_CYCLE); // play death frames animation
my.skill22 += 1 * time_step; // "death" animation speed
wait (1);
}
my.passable = on; // the corpse can't be hit by the sword from now on
}
}




My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."