guys, need your help,. what seems to be the problem in this code? the error message is "invalid arguments in entity" referring to function func_backselectenemy(), the entity mangyanenemy. i can't remove it! The simplified code are shown below:
function func_startbagobo_mangyan()
{
pan_backselectenemy=pan_create("
pos_x = 0;
pos_y = 0;
button ( 50, 550, \"cancel.pcx\", \"cancel.pcx\", \"cancel_over.pcx\", func_backselectenemy, NULL, NULL);
flags = OVERLAY | VISIBLE;
",11);
bagobo_walk.z=60;
ent_animate(bagobo_walk, "steady", anim_percentage, ANM_CYCLE);
townlevel=ent_create("town.hmp", vector(0,0,-10),NULL);
camera.z = 1;
camera.tilt = -10;
vec_set(camera.x, vector(-500, 0, 100));
mangyanenemy = ent_create("mangyan.mdl", vector(0,-100,-10),NULL);
mangyanenemy.pan=-90;
mangyanenemy.z=60;
mangyanenemy.x=-175;
mangyanenemy.y=-150;
ent_animate(mangyanenemy, "steady", anim_percentage, ANM_CYCLE);
}
function func_backselectenemy()
{ ent_remove(mangyanenemy);
pan_remove(pan_backselectenemy);
ent_remove(townlevel);
}
can you tell me what is the problem?. thank you so much,. why sometimes the entity won't remove.