Alright, sorry I don't have more time but I have to get to work again, but with my first look over it seems that your nothing calls the function is_ReturnAngleForTurningToEntity(eAgent,eTarget) this means that is_tempvec5.pan is never existing in your action, you must call it in action so something like
-----------------------------------------
//Note you must define first_entity and second_entity to be the appropriate entities
is_tempvec5.pan = is_ReturnAngleForTurningToEntity(first_entity, second_entity);
//this must be right before

while(my.pan!=is_tempvec5.pan)

//to work
---------------------------------------
This is just a rough guess, but I've let you know what is definately wrong, I'm going to be busy for at least another day, so hopefully this will help you enough to get you going again.


A clever person solves a problem.
A wise person avoids it.
--Einstein

Currently Codeing: Free Lite-C