As Lasmelan said:
Best to not use a function.
Otherwise, you need a condition to pick the specific missile you want destroyed. There are a few ways to do this, including with uid, but again it is best to not use a function here.
To use UID - in the event where Missile on collision, you would add an action to set a variable to Missile.UID. Then in the function, you would add a condition to Pick by UID, and reference that variable.