Analog Write with 12 LEDs on an Arduino Mega- error message

Arduino: 1.6.11 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\Diana\AppData\Local\Temp\arduino_modified_sketch_438142\sketch_sep01a.ino: In function 'void loop()':

sketch_sep01a:13: error: 'thisPin' was not declared in this scope

for (thisPin = lowestPin; thisPin <= highestPin; thisPin++)

^

sketch_sep01a:20: error: 'thisPin' was not declared in this scope

analogWrite(thisPin, brightness);

^
is this code missing something, because on the page I copied it verbatim(i am pretty sure) and got this error message

C:\Users\Diana\AppData\Local\Temp\arduino_modified_sketch_438142\sketch_sep01a.ino: At global scope:

sketch_sep01a:25: error: expected declaration before '}' token

}

^

exit status 1
'thisPin' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

nevermind, figured it out :slight_smile: