udf problem.... pls help

Hi everybody, I am doing a 2D problem in which a small wedge protrudes out in Y direction from the surface while air flows over it in the X direction. I am following the UDF for the piston motion i.e One DOF equation of motion of the piston in X direction from the UDF manual (Dynamic mesh EFINE_CG_MOTION). I have changed the set x component of velocity to Y component by setting vel[1]= vel_prev. After I compile the UDFsuccessfully, i am unable to progress further since there is error msg . The error is Error: get_udf_function: function piston::libudf has wrong type: 39!=46. can any one help me please.

I also made a simple 2D clinder and piston geometry and used the same UDF for the X direction motion. still the same access voilation error occurs. I have used the UDF which given for the 1DOF eqn of motion for Dynamic mesh in the UDF manual( chapter 4, para 4.5). I am confused as to whether I have to do anymore changes in the UDF before i use it. can u pls help me.