When you debug code of the robot it is not stored permanently, so when you reset it there is no user code. I'm guessing this is what happened.
Make sure that you've read and understand pages
20-26 of the C/C++ Programming Guide.
You may be having a different issue, but without more detail about the error message I can't know.
The battery voltage monitoring and reporting code is located in the WPILib code, so unless you're running a modified version then it should report a voltage. Even if you broke that part of the code it would report 0.0 volts not NO CODE.