Here's my corrected code


Code:
function glass_broken(PARTICLE* glassy)
{
	VECTOR temp;
	
	vec_randomize(temp.x,2);
   vec_add(glassy._VEL_X,temp.x);
   
   set(glassy, _MOVE | BRIGHT | TRANSLUCENT);
   glassy.alpha = 100;
   glassy._SIZE = 800;
   glassy._GRAVITY = 0.2;
   glassy.alpha = 50;
   glassy._LIFESPAN = 16*2;
   
   glassy.event = NULL;
}


function glass_shot()
{
	if(event_type == EVENT_SHOOT && (mouse_left) && (player_shooting) && (ammo[current_weapon] > 0) && (player_health > 0))
	{
   effect_sprite("glass_piece1.tga",glass_broken,20,player1.x,nullvector); //The download link for "glass_piece.tga" is lying below
   
   wait(1);
   ent_remove(my);
   }
}


action glass_action1()
{
	my.pan += 360;
   set(my,POLYGON);
   
   my.emask |= ENABLE_SHOOT;
   my.event = glass_shot;

	if(is(my,TRANSLUCENT) == 0) set(my,TRANSLUCENT);
	my.alpha = 50;
}





And here's a download link for the glass piece sprite ("galss_piece1.tga"):

I'm the download link!... Click me!!