receive this error code when verifying ColorCrossFadeRGBLED sketch ?

When I try to verify this code this line gets high lighted in the code it self:

bluVal = calculateVal(stepB, bluVal, i);

On the bottom of the sketch I get the fallowing error message:

'stepB' was not declared in this scope

arduino-builder/arduino-builder -compile -core-api-version 10611 -build-path /tmp/187362358 -hardware arduino-builder/hardware -hardware arduino-builder/packages/cores -tools arduino-builder/tools -tools arduino-builder/packages/tools -built-in-libraries arduino-builder/latest -libraries /tmp/768638835/pinned -libraries /tmp/768638835/custom -fqbn arduino:avr:uno -build-cache /tmp -verbose=false /tmp/768638835/ColorCrossFadingRGBLED

/tmp/768638835/ColorCrossFadingRGBLED/ColorCrossFadingRGBLED.ino: In function 'void crossFade(int*)':

/tmp/768638835/ColorCrossFadingRGBLED/ColorCrossFadingRGBLED.ino:114:28: error: 'stepB' was not declared in this scope

bluVal = calculateVal(stepB, bluVal, i);


exit status 1

bekathwia21 days ago

When you get any error that says "not declared in this scope," it means it's missing a variable declaration. For me the sketch compiles just fine, and int stepB is declared just a few lines above the part that's throwing your error (line 191). Are you sure you copied the whole sketch, and didn't accidentally delete part of it?

Screen Shot 2017-04-06 at 9.50.55 AM.png
Mark Richardson (author)  bekathwia16 days ago

Thank you for your help your answer made me go back and recheck for typing mistakes and I found two. these codes/programs are very sensitive. I had one letter upper case and one word misspelled. I fixed them and it worked fine. I also figured out how to copy / paste from the autodesk so no more manually typing in the code. THANKS again.....