Hi,
First of all, you're using Lite-C, not C-Script (you can't use switch/case in c-script)

I can't tell why it crashes without seeing more of your code, but to check whether the missile hits the player or the box, use a skill to determine that, e.g.:
player's skill1 = 1
box's skill1 = 2
then in the missile event, you can check (if event_entity) whether you.skill1 is 1 or 2
