The reason you are running into this is because the 'untilEncoderCounts' command automatically resets the encoder counts when it is called (pulled from the NatLang_Cortex.c include file):
This particular task may be beyond the functionality of the Natural Language programming and could serve as a good introduction to true ROBOTC programming. You can create either a custom function without the 'SensorValue[sensorPort] = 0;' command (or equivalent), or add the while loop directly into the code:
There are also other ways to perform this behavior and these are only two examples of how to do this.
Check out our Blog
! And our Facebook page
Need help? Take a look at our Wiki
and our Forums.I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody