Re: Discrepancy with Autonomy from website
Hi Ken -
You're right, the numbering on page 32 should start on a line further down than "1".
In general, when copying, pasting, adding, or removing code based on the VEX lessons, I'd recommend using the "landmarks" in the code, rather than the actual line numbers (which can honestly get confusing). By landmarks, I mean the surrounding lines of code, that we always show in the PDF's and videos. For example, on page 34 we have the following code:
The PDF version tells you to add the "bool isMovingStraight;" and "isMovingStraight = false;" which have surrounding code, or landmarks. The reason that I recommend this is because ROBOTC does not renumber your code until you recompile, so your program (which is what the video shows) may have any number of duplicate lines (eight lines beginning with "75", for instance).
There's a reason for that too - when debugging programs, ROBOTC lets the user know which lines have bugs. If the programmer fixes a bug on line #1 by adding another line or two, subsequent bug reports would off, making it harder to track down and fix them.
If you're still having trouble with your code, feel free to actually post it to the ROBOTC forums so others (myself included) can take a look at it.