Set tangent at spline point not working!

Sorry i have deleted the code which was producing the error. I am only working on one project.