I don't quite understand how your vectors are working. This line in particular
Code:
vec_set(oldDestDist,abs(vec_dist(my.x,destination)));
should be an error. abs() will give you a number, the distance to the target, but then you're plugging that into vec_set. This will do something like
Code:
vec_set(oldDestDist, 50.000);
which would usually be a crash unless the distance happens to be a valid pointer.
You're also assigning a single number to an array in a few other places, although in C-Script this is valid as long as you realize you're assigning to the first element of the array only.
It seems like you need to make your var[3]s just vars.