Error code " 'display' was not declared in this scope"

[
#include <Adafruit_GFX.h>
#include <Adafruit_SPITFT.h>
#include <Adafruit_SPITFT_Macros.h>
#include <gfxfont.h>
#include <Adafruit_SSD1306.h>
#include <splash.h>
#include <WireData.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <LiquidCrystal.h>
#include <U8glib.h>

#define dht_apin A5 // Analog pin to which the sensor is connected dht DHT;
#define DHTPIN 2

/Uncomment and comment/
#define DHTTYPE DHT11 // DHT 11
//#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
//#define DHTTYPE DHT21 // DHT 21 (AM2301)

DHT dht (DHTPIN,DHTTYPE);
/Uncomment and comment/
U8GLIB_SH1106_128X64 u8g(13, 11, 10, 9, 8); // DIN=13, CLK=11, CS=10, DC=9, Reset=8
//U8GLIB_SSD1306_128X32 u8g(13, 11, 10, 9, 8); // DIN=13, CLK=11, CS=10, DC=9, Reset=8
//U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9, 8); // DIN=13, CLK=11, CS=10, DC=9, Reset=8

volatile byte half_revolutions;
unsigned int rpm;
unsigned long timeold;

#define temp_sensor_pin A0
#define ref_pin A1
#define fan_op_pin 9
#define sound_pin 10
float temperature;
int fan_speed = 50;

void setup()
// put your setup code here, to run once:
{
Serial.begin(115200);
dht.begin();
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)){
Serial.println(F(“SSD1306 allocation failed”));
for(;;);
}

display.setTextColor(WHITE)
}
void loop()
{
float t=dht.readTemperature();
if (isnan(t)
delay(2000);
display.clearDisplay();
Serial.println(“Failed to read from DHT sensor!”);
display.setTextSize(1);
display.setCursor(0,0);
display.print(“Temperature:”);
display.setTextSize(2);
display.setCursor(0,10);
display.print(t);
display.print(" ");
display.setTextSize(1);
display.cp437(true);
display.write(167);
display.setTextSize(2)
display.print(“F”)
display.display()

}
]
So I’m working on trying to get my code to allow my 1.3 inch OLED display to read my DHT11 temperature sensor. I’m only wanting it to read the temperature, not the heat index or the humidity. My actual project is an external cooling fan I’m making and programming for a gaming console but for now I’m focusing on trying to get the display to get the readings from the sensor. So far though I have an error code I can’t really figure out.Here is the Error code:
[Arduino: 1.8.12 (Windows Store 1.8.33.0) (Windows 10), Board: “Arduino Uno”

C:\Users\hungr\OneDrive\Documents\Arduino\CoolingFan_OPeration_Code__2\CoolingFan_OPeration_Code__2.ino: In function ‘void setup()’:

CoolingFan_OPeration_Code__2:43:5: error: ‘display’ was not declared in this scope

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)){

^~~~~~~

C:\Users\hungr\OneDrive\Documents\Arduino\CoolingFan_OPeration_Code__2\CoolingFan_OPeration_Code__2.ino:43:5: note: suggested alternative: ‘delay’

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)){

^~~~~~~

delay

CoolingFan_OPeration_Code__2:48:2: error: ‘display’ was not declared in this scope

display.setTextColor(WHITE)

^~~~~~~

C:\Users\hungr\OneDrive\Documents\Arduino\CoolingFan_OPeration_Code__2\CoolingFan_OPeration_Code__2.ino:48:2: note: suggested alternative: ‘delay’

display.setTextColor(WHITE)

^~~~~~~

delay

C:\Users\hungr\OneDrive\Documents\Arduino\CoolingFan_OPeration_Code__2\CoolingFan_OPeration_Code__2.ino: In function ‘void loop()’:

C:\Users\hungr\OneDrive\Documents\Arduino\CoolingFan_OPeration_Code__2\CoolingFan_OPeration_Code__2.ino:53:7: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z

if (isnan(t)

^~~~~

CoolingFan_OPeration_Code__2:54:5: error: expected ‘;’ before ‘delay’

delay(2000);

^~~~~

CoolingFan_OPeration_Code__2:55:5: error: ‘display’ was not declared in this scope

display.clearDisplay();

^~~~~~~

C:\Users\hungr\OneDrive\Documents\Arduino\CoolingFan_OPeration_Code__2\CoolingFan_OPeration_Code__2.ino:55:5: note: suggested alternative: ‘delay’

display.clearDisplay();

^~~~~~~

delay

CoolingFan_OPeration_Code__2:55:27: error: expected ‘)’ before ‘;’ token

display.clearDisplay();

^

CoolingFan_OPeration_Code__2:57:5: error: ‘display’ was not declared in this scope

display.setTextSize(1);

^~~~~~~

C:\Users\hungr\OneDrive\Documents\Arduino\CoolingFan_OPeration_Code__2\CoolingFan_OPeration_Code__2.ino:57:5: note: suggested alternative: ‘delay’

display.setTextSize(1);

^~~~~~~

delay

exit status 1
‘display’ was not declared in this scope

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.]

If anyone can help me with this issue, I would greatly appreciate it. I’m sorry I tried getting the Error code to come in a code box but it didn’t come out that way.

Start by looking at Read this before posting a programming question and posting your code correctly. Unless, of course, it really has smileys in it

Why are you trying to call methods on an object that you haven't created? The code you swiped that from most certainly DID create an object called display.