the error of fix addfroce and expected floating point parameter in input script or data file

Hi all ,
I encountered a problem when I tried to use the command fix addforce to apply the sample loading .I received the error information “ERROR: Expected floating point parameter in input script or data file”.Here is my partial input files.

label loop variable n loop 5000 variable A equal -0.005*($n-1) variable B equal -0.005*$n variable C equal 0.005*($n-1) variable D equal 0.005*$n variable f1 equal ramp($A,$B) variable f2 equal ramp($C,$D) fix 4 left addforce v_f1 NULL NULL fix 5 right addforce v_f2 NULL NULL run 500000 unfix 4 unfix 5 fix 6 left addforce $B NULL NULL fix 7 right addforce $D NULL NULL run 500000 unfix 6 unfix 7 next n jump in.line_little420 loop variable n delete

Someone told me that I should replace NULL with a floating point parameter , because lammps regards the NULL to a integer. Then I replaced the NULL with 0.0.
Namely,the changed input files as follows:

label loop variable n loop 5000 variable A equal -0.005*($n-1) variable B equal -0.005*$n variable C equal 0.005*($n-1) variable D equal 0.005*$n variable f1 equal ramp($A,$B) variable f2 equal ramp($C,$D) fix 4 left addforce v_f1 0.0 0.0 fix 5 right addforce v_f2 0.0 0.0 run 500000 unfix 4 unfix 5 fix 6 left addforce $B 0.0 0.0 fix 7 right addforce $D 0.0 0.0 run 500000 unfix 6 unfix 7 next n jump in.line_little420 loop variable n delete

To my happiness, There is no error any more .But In my simulation ,I could not add force in the y and z direction.That is to say, I must keep the y and z direction relaxed.If I replaced the NULL with 0.0,the simulation is not that I want to get .So what I want to know is whether there exists another way to solving the problem rather than what I did .Can anone give me some suggestions or feedback? I would really appreciate your kindly help.

First, the doc page for fix addforce does not say that
you can use NULL as an argument. So I’m not clear
why you think you should be able to use it.
That is the source of the error.

Second, if you don’t want any extra force applied to a dimension,
then use 0.0, which will add zero force. I.e. it is the
same as doing nothing in those dims, or what I imagine
you think NULL would do.

Steve