The problem is with "lblTotal.Text". It is blank by default which the optimising compiler cannot convert to a number and so errors. Set the text to "0" and it works.
You didn't show this line in your code snippet "precototal=lblTotal.Text+precoParcial"
