@ Redeemer, that doesn't seem to be the problem.

@ FoxHound, apparently, there's a syntax error in the line
Code:
if(200 > vec_dist(my.x,player.x));


I can't see any syntax errors.