WOOOOO I got it. After hours of looking at the wrong thing it turns out my problem was with the following.

in the while(1) statememt...
Code:
result = vec_to_angle(angle,vec_diff(temp,my.skill20,my.x));

if (result < 25)
    {
	node = path_nextnode(my,node,1);
	path_getnode(my,node,my.skill20,NULL);
    }



apparently my path was having the wizard turn more than 25 (the returned value from vec_to_angle) and thus it wouldn't run the if (result < 25) statement since that statement never evaluated to true.

By increasing the value after the if it now works flawlessly!