Im not big on events, but I feel the problem is somewhere here
Code:
   you.state = dead;
   wait(1);      //Let the object know it's dead and exit the function
   ent_remove(you);
If the YOU object has an action that makes it ent_remove itself on "dead" state, then it has time to do so during the wait(1).
So now the YOU pointer is empty in this function, and errors out on the ent_remove(you); line.

If the YOU entity does self-remove, then I suggest ditching the ent_remove(you), assuming the YOU can be trusted to 'die' properly.
Otherwise ditch the you.state and wait lines so it 'dies' here.

Let us know how it goes...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial