When the compiler gives errors the code is by definition (for all practical purposes) incorrect
"When you write a numeric constant with a decimal point, it's a "double," a Where totalCollected = 0.0; this is not intended to be a numeric constant that I know of. "
0.0 is a constant double, totalCollected is assigned the value of that constant double (so 0.0).
If totalCollected is of a datatype that cannot be implicitly cast to double (like float, which is too small to hold the maximum data a double can hold) you will get an error telling you so.
Use 0.0f instead to force it to float, or (and more usually done) forget about float and use double always.