The you.x part does not make sense, but I've got the code working like this:
Code:
var i=0; var k=0; var tttt[3];
var min_val=500; var min_i;
while (i < ent_vertices (my))
{
vec_for_vertex(tttt,my,i);
//k=vec_dist(tttt,you.x);
k=vec_dist(tttt,target.x);
if(k<min_val)
{min_val=k; min_i=i;}
i+=1;
}
vec_for_mesh(temp,my,min_i);
vec_scale(temp,0.2);
vec_to_mesh(temp,my,min_i);
ent_fixnormals(my,0);