Add the following while loop BEFORE your while(1) loop:
while(!player) { wait(1); }
This will wait until the player pointer gets non-zero.
So it prevents any empty pointer message.
However I think the player pointer will no be set at all, so try out the edited code from me above, which works with the camera position.

Another thing:
Instead of writing:
vector.x = bla.x
.y = .y
and so on, you can simply write:
vec_set(player_vector.x,player.x);
This does exactly the same as your 3 lines in the action "vec_dist_test"

However there is no need to store this, caus you can also pass entity parameters (such as positions, skills) to a engine function.

Next thing is:
vec_length does not return the distance of your player to the object, but the distance to the level origin.

And:
As I said do NOT remove an entity from within its while loop.
Instead use a skill (set to zero) as a condition for the while loop.
so: while(!my.skill20) will run as long as my.skill20 == 0
Set skill20 to non-zero and the while loop will be aborted and the action will continue with the stuff which comes behind the while loop.
Take a close look at my example thats exactly what I'm doing.