I have the same problem doing that. Here is my entire relevant code.

Code:
int crowd_num = -1;
VECTOR* crowd_pos[100];
ENTITY* crowd[100];


Code:
action test_flocker()
{
	crowd_num++;
	VECTOR* my_pos;
	my_pos = vector(my.x,my.y,my.z);
	var crowd_counter = -1;
	my = crowd[crowd_num];
	crowd_pos[0] = my_pos;
	while(1)
	{
		if(vec_dist(my_pos.x, crowd_pos[0].x) > 10)
		{
			c_move(me,vector(0,10*time_step,0),nullvector,GLIDE);
			wait(1);
		}
		wait(1);
	}
}