Error was not declared in this scope after new computer (windows 11)

A waste of code space - you're doing analogRead on all these pins.