Hi,
I'm sorry to hear you're having trouble with it. The description for XVertexType should say (we'll fix): 'Type of current X Spline vertex (1 = Corner, 2 = Bezier, 3 = Bezier-Corner, 4 = Smooth).' instead of the current: 'Type of current X Spline vertex (0 = Smooth, 1 = Corner, 2 = Bezier, 3 = Bezier-Corner).'"
In your case, using the
return if(XVertexType==4, 1, 2);
should do the trick.
I hope that helps.
Best regards,