The errror you see on line 44(BAS file) is that you have re-declared the variable LEDs as a label. PBP is case in-sensitive.

Second, you read the switches and rotary encoder just once at the start and then keep displaying that value. Is that what you intended?

Your Leds code is never reached.