ct==MERC and ct==FLRC should be ct==PT_MERC and ct==PT_FLRC on line 9 Edit: And in FLRC and MERC's code on line 55 down there should be more spaces. else if (ct==PT_FLRC&&parts[i].life<=1&&parts[r>>8].type=PT_MERC) Should be: else if (ct==PT_FLRC && parts[i].life <= 1 && parts[r>>8].type=PT_MERC)