WL_IDLE_STATUS was not declared in this scope

I’m doing my first project with an Arduino Nano 33 IoT and using code from a GitHub project to connect OSC from my iPhone, to devices on a Virtual camera to Unreal 4.25 via Arduino.

I’ve solved almost every issue I’ve run into so far (usually just downloading the needed libraries and updating) except I seem to be stuck on this error when I try to verify the code I run into this error:
WL_IDLE_STATUS was not declared in this scope

Top half of my code is below (due to character max here):

void setup() {
 // put your setup code here, to run once:

#include <SPI.h>
#include <WiFiNINA.h>
#include <WiFiUdp.h>
#include <OSCMessage.h>  
#include <Smoothed.h>

// wifi login data
char ssid[] = "2G";         // your network SSID (name)
char pass[] = "PW";    // your network password (use for WPA, or use as key for WEP)
[color=#ff0000][b]int status = WL_IDLE_STATUS;     // the Wifi radio's status[/b][/color]
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // you can find this written on the board of some Arduino Ethernets or shields

WiFiUDP Udp;                           // A UDP instance to let us send and receive packets over UDP
const IPAddress destIp(10,0,0,23);   // remote IP of the target device
const unsigned int destPort = 8000;    // remote port of the target device where the NodeMCU sends OSC to
const unsigned int localPort = 9000;   // local port to listen for UDP packets at the NodeMCU (another device must send OSC messages to this port)

// define values
const int dialA_pin = 0; // analog pin connected to dialA
const int dialB_pin = 1; // analog pin connected to dialB
const int X_pin = 2; // analog pin connected to X output
const int Y_pin = 3; // analog pin connected to Y output
const int SW_pin = 12; // digital pin connected to switch output
const int GO_pin = 11; // digital pin connected to go button

const int smoothScale = 10; // how much the analog value should be smoothed / size of array to average
const int value_threshold = 10; // difference to ignore when changing value on dials & joystick
Smoothed <float> dialA_smoothArray;
Smoothed <float> dialB_smoothArray;
Smoothed <float> joystickX_smoothArray;
Smoothed <float> joystickY_smoothArray;

// initialize variables
int value_dialA = 0;
float value_dialA_remapped = 0.0;
int value_dialB = 0;
float value_dialB_remapped = 0.0;
bool value_joystickButton = 0;
bool value_goButton = 0;
int value_joystickX = 0;
int init_diff_joystickX = 0;
float value_joystickX_remapped = 0;
int value_joystickY = 0;
int init_diff_joystickY = 0;
float value_joystickY_remapped = 0;
int tmpint;

void setup() {
 Serial.begin(115200);
 pinMode(SW_pin, INPUT);
 digitalWrite(SW_pin, HIGH);
 setIdleValues();

 dialA_smoothArray.begin(SMOOTHED_AVERAGE, smoothScale);
 dialB_smoothArray.begin(SMOOTHED_AVERAGE, smoothScale);
 joystickX_smoothArray.begin(SMOOTHED_AVERAGE, smoothScale);
 joystickY_smoothArray.begin(SMOOTHED_AVERAGE, smoothScale);

 // Specify a static IP address
 // If you erase this line, you will get a dynamic IP address
 //WiFi.config(IPAddress(192,168,1,255),IPAddress(192,168,0,1), IPAddress(255,255,255,0));

 // Connect to WiFi network
 Serial.println();
 Serial.print("Connecting to ");
 Serial.println(ssid);
 WiFi.begin(ssid, pass);

 while (WiFi.status() != WL_CONNECTED) {
   delay(200);
   Serial.print(".");
 }

 Serial.println("");
 Serial.println("WiFi connected");
 Serial.println("IP address: ");
 Serial.println(WiFi.localIP());

 Serial.println("Starting UDP");
 Udp.begin(localPort);
 Serial.print("Local port: ");
 Serial.println(localPort);
}

// WIFI DEBUG MESSAGES
void printWifiData() {
 // print your board's IP address:
 IPAddress ip = WiFi.localIP();
 Serial.print("IP Address: ");
 Serial.println(ip);
 Serial.println(ip);

 // print your MAC address:
 byte mac[6];
 WiFi.macAddress(mac);
 Serial.print("MAC address: ");
 printMacAddress(mac);
}

void printCurrentNet() {
 // print the SSID of the network you're attached to:
 Serial.print("SSID: ");
 Serial.println(WiFi.SSID());

 // print the MAC address of the router you're attached to:
 byte bssid[6];
 WiFi.BSSID(bssid);
 Serial.print("BSSID: ");
 printMacAddress(bssid);

 // print the received signal strength:
 long rssi = WiFi.RSSI();
 Serial.print("signal strength (RSSI):");
 Serial.println(rssi);

 // print the encryption type:
 byte encryption = WiFi.encryptionType();
 Serial.print("Encryption Type:");
 Serial.println(encryption, HEX);
 Serial.println();
}

void printMacAddress(byte mac[]) {
 for (int i = 5; i >= 0; i--) {
   if (mac[i] < 16) {
     Serial.print("0");
   }
   Serial.print(mac[i], HEX);
   if (i > 0) {
     Serial.print(":");
   }
 }
 Serial.println();
}

{Please use the code tags button, </> on the menu, in future posts. Thanks, Moderator}

You seem to be missing a line declaring WL_IDLE_STATUS as a variable before you attempt to give something the value of WL_IDLE_STATUS, such as

int WL_IDLE_STATUS;
or
int WL_IDLE_STATUS = 0;

WL_IDLE_STATUS is an in-built variable iirc, for ESP8266 based modules.
I used to program with WiFiEsp library for ESP01, it has the exact same line.
Makes sense too since the NINA module that handles WiFi and Bluetooth is handled by an ESP8266.

CrossRoads:
You seem to be missing a line declaring WL_IDLE_STATUS as a variable before you attempt to give something the value of WL_IDLE_STATUS, such as

int WL_IDLE_STATUS;
or
int WL_IDLE_STATUS = 0;

This seemed to fix this error and I'm noticing lots of errors in this code now, this helps me get a direction going now thanks!

Ok, good luck rooting them out.