Here is my code for a bullet and gun;
Code:
action act_laser()
{
	set(my,PASSABLE);
	my.pan = player.pan;
	var kill_timer = 50;
	while(1)
	{
		c_move(me,vector(50 * time_step,0,0),nullvector,NULL);
		kill_timer -= 1 * time_step;
		if (kill_timer <= 0)
		{
			ent_remove(me);
			return;
		}
		wait(1);
	}
}

action act_lasergun()
{
	set(my,PASSABLE);
	ent_create("models//laserbullet.mdl",vector(my.x,my.y,my.z),act_laser);
	while(1)
	{
		my.pan = player.pan;
		if (!key_j)
		{
			ent_remove(me);
			return;
		}
		wait(1);	
	}
}


I am trying to make it where the gun is created then it creates the bullet right? Then I get an error saying I removed it wrong with error E1516.
How do I properly destroy an object that needs to be used again? or what do I do?


boolean my.awesomeness = so true;