Are you walking or running when you record the rail? you should always walk when you record, otherwise you'll get x,y,z values that don't match a real-world spot and you'll get that error.
Another key thing is to record your x-y-z locations on one line. Like:
set %xyz #CHARPOSX , _ , #CHARPOSY , _ , #CHARPOSZ
Then when you are playing these spots back, you break this back up using the "_" to find the separation of each of the coords.
Why? Well the way EUO works is there's a 20ms pause between lines of code if you are running with #LPC of 10 which is default. So this is really what happens:
set %x #CHARPOSX
(wait 20)
set %y #CHARPOSY
(wait 20)
set %z #CHARPOSZ
(wait 20)
You see that in order to record this spot, you've actually had a chance to mess up your coordinates because you've had 60ms elapse. But if you do it the way I show, all coords are recorded simultaneously from the perspective of your script.