Using an arduino doc to get a nano 33ble working

I have an arduino 33BLE that I would like to get working.
I am trying to work through
https://docs.arduino.cc/tutorials/nano-33-ble/bluetooth/?_gl=1*1ptqoqr*_up*MQ.._gaNjMwMzk2OS4xNzY1MzAwMTkx*_ga_NEXN8H46L5*czE3NjUzMDAxODkkbzEkZzAkdDE3NjUzMDAxODkkajYwJGwwJGg2NzM1Mzc0MDA.
which is the arduino doc to help get the 33BLE working.
I have started to alter the program 'led' as directed in the article but come to a stop when I try to include the extra led's, It fails to compile and I am guessing it is failing because the led's LEDR, LEDG AND LEDB haven't been assigned? Is this because of an error in the article or are they assigned in the library?
The original sketch 'led' compiles fine but when I add the second change 'set the led pins as output' I get 'error verifying' when I try to compile.
I have

pinMode(LEDR, OUTPUT);
pinMode(LEDG, OUTPUT);
pinMode(LEDB, OUTPUT);

but as they are not external pins how do I assign them?

ADDED :-
for some reason adding

const int LEDR = LEDR;
const int LEDG = LEDG;
const int LEDB = LEDB;

before the setup seems to have cured it and the serial monitor shows that I have sent a signal but the led colour does not change?

Can you post the full code you are using ?

Are you sure you picked the right board - the constants are defined for you in the core

Do this problem has anything to do with your other post?

the board is a 33 IoT. See last line of this thread.

#include <ArduinoBLE.h>

BLEService ledService("180A"); // BLE LED Service

// BLE LED Switch Characteristic - custom 128-bit UUID, read and writable by central
BLEByteCharacteristic switchCharacteristic("2A57", BLERead | BLEWrite);
const int LEDR = LEDR;
const int LEDG = LEDG;
const int LEDB = LEDB;

void setup() {
  Serial.begin(9600);
  while (!Serial);

  // set LED's pin to output mode
  pinMode(LEDR, OUTPUT);
  pinMode(LEDG, OUTPUT);
  pinMode(LEDB, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);

  digitalWrite(LED_BUILTIN, LOW);         // when the central disconnects, turn off the LED
  digitalWrite(LEDR, HIGH);               // will turn the LED off
  digitalWrite(LEDG, HIGH);               // will turn the LED off
  digitalWrite(LEDB, HIGH);                // will turn the LED off

  // begin initialization
  if (!BLE.begin()) {
    Serial.println("starting Bluetooth® Low Energy failed!");

    while (1);
  }

  // set advertised local name and service UUID:
  BLE.setLocalName("Nano 33 BLE");
  BLE.setAdvertisedService(ledService);

  // add the characteristic to the service
  ledService.addCharacteristic(switchCharacteristic);

  // add service
  BLE.addService(ledService);

  // set the initial value for the characteristic:
  switchCharacteristic.writeValue(0);

  // start advertising
  BLE.advertise();

  Serial.println("BLE LED Peripheral");
}

void loop() {
  // listen for BLE peripherals to connect:
  BLEDevice central = BLE.central();

  // if a central is connected to peripheral:
  if (central) {
    Serial.print("Connected to central: ");
    // print the central's MAC address:
    Serial.println(central.address());
    digitalWrite(LED_BUILTIN, HIGH);            // turn on the LED to indicate the connection

    // while the central is still connected to peripheral:
    while (central.connected()) {
      // if the remote device wrote to the characteristic,
      // use the value to control the LED:
      if (switchCharacteristic.written()) {
        switch (switchCharacteristic.value()) {   // any value other than 0
          case 01:
            Serial.println("Red LED on");
            digitalWrite(LEDR, LOW);            // will turn the LED on
            digitalWrite(LEDG, HIGH);         // will turn the LED off
            digitalWrite(LEDB, HIGH);         // will turn the LED off
            break;
          case 02:
            Serial.println("Green LED on");
            digitalWrite(LEDR, HIGH);         // will turn the LED off
            digitalWrite(LEDG, LOW);        // will turn the LED on
            digitalWrite(LEDB, HIGH);        // will turn the LED off
            break;
          case 03:
            Serial.println("Blue LED on");
            digitalWrite(LEDR, HIGH);         // will turn the LED off
            digitalWrite(LEDG, HIGH);       // will turn the LED off
            digitalWrite(LEDB, LOW);         // will turn the LED on
            break;
          default:
            Serial.println(F("LEDs off"));
            digitalWrite(LEDR, HIGH);          // will turn the LED off
            digitalWrite(LEDG, HIGH);        // will turn the LED off
            digitalWrite(LEDB, HIGH);         // will turn the LED off
            break;
        }
      }
    }

    // when the central disconnects, print it out:
    Serial.print(F("Disconnected from central: "));
    Serial.println(central.address());
    digitalWrite(LED_BUILTIN, LOW);         // when the central disconnects, turn off the LED
    digitalWrite(LEDR, HIGH);          // will turn the LED off
    digitalWrite(LEDG, HIGH);        // will turn the LED off
    digitalWrite(LEDB, HIGH);         // will turn the LED off
  }
}

this is the code I took from the link above with my small addition that allows it to compile

const int LEDR = LEDR;
const int LEDG = LEDG;
const int LEDB = LEDB;

this is the sketch that partially works, it updates the serial monitor when I send a code using my mobile and the software recommended in the link above, lightblue.
if I alter it, comment out the 3 lines above and replace them with

//#define PIN_LED     (13u)
#define LED_BUILTIN PIN_LED
#define LEDR        (22u)
#define LEDG        (23u)
#define LEDB        (24u)
#define LED_PWR     (25u)

I commented out the first line as the compile doesn't seem to like that one?
Now when I run it it is ok when I send 3 (the code for the blue led) but crashes if I send 1 (the code for the red led). At least it still shows the send on the monitor but the leds on the unit don't change.
I have a green led one side of the usb plug and a yellow one the other side, is one of these supposed to be the multi coloured led?

Does the 33IoT not have a multi-coloured led? Am I barking up the wrong tree?

Unless I’m mistaken, the Arduino Nano 33 IoT does not have a built-in RGB LED…

Which is it? They're two different boards. Only one of which (the BLE) has a built-in RGB LED.

BLE schematic

IoT schematic

So we established you don’t have the LED then.

By the way, the fact that this compiles is also an indication as per my post 2, in the core the names are #defined and thus your « hack »

Going through the preprocessor would lead to

const int 22u = 22u;
const int 23u = 23u;
const int 24u = 24u;

As every occurrence of the name is replaced and this is not legit code.

It probably means the names come from an enum or something else you had in your code but there is no chance this would make any difference.