Compiling issues

I have an older sketch that runs three temp sensors and two Humd sensors thru a multiplexer with no issues. This winter I wanted to add a load cell, but I can't get this bad boy to compile. I'm not a coder, I don't know all the fine points but I have the following error (I think I'm having a bracket issue) but can't put my finger on it. A fresh set of eyes may help.

EMT

Error;
'weight' was not declared in this scope

#define BLYNK_PRINT Serial
#include <Wire.h>


#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>


//#include <BlynkSimpleWiFiShield101.h>
#include <Adafruit_MCP9808.h>
#include <Adafruit_Si7021.h>
#include <Q2HX711.h>


// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "zkq5H0yYd*******************";

// Set password to "" for open networks.
char ssid[] = "Skynet";
char pass[] = "*****************";

#define calibration_factor -3750.0

#define SCALE_DATA_PIN  3
#define SCALE_CLOCK_PIN  2

Q2HX711 scale(SCALE_DATA_PIN, SCALE_CLOCK_PIN);


#define TCAADDR 0x70

#define TCAADDR       0x70
#define TEMP1_ADDR    0x18
#define TEMP2_ADDR    0x18
#define TEMP3_ADDR    0x18
#define HUM1_ADDR     0x40
#define HUM2_ADDR     0x40


// Assign unique ID to each sensor
Adafruit_MCP9808 temp1 = Adafruit_MCP9808();
Adafruit_MCP9808 temp2 = Adafruit_MCP9808();
Adafruit_MCP9808 temp3 = Adafruit_MCP9808();
Adafruit_Si7021 hum1 = Adafruit_Si7021();
Adafruit_Si7021 hum2 = Adafruit_Si7021();

float temperature1;
float temperature2;
float temperature3;

float humidity1;
float humidity2;

long int loadcell;
long int tare;

void tcaselect(uint8_t i) {
  if (i > 7) return;

  Wire.beginTransmission(TCAADDR);
  Wire.write(1 << i);
  Wire.endTransmission();
}

void getWeight()

{  //String weight = String(scale.get_units(1), 2);
  weight = scale.get_units(1);
}


// standard Arduino setup()
void setup(void)
{
  Wire.begin();
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);


  //these functions do not exist. you need to implement in firmware.
  //scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch
  //scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

  /////

  {
    //setup temp sensors:
    tcaselect(7);
    if (!temp1.begin(0x18))
      Serial.println("Couldn't find Temp1! Check your connections and verify the address is correct.");
    while (1);
  }

  Serial.println("Found MCP9808, Sensor 1!");

  temp1.setResolution(0); // sets the resolution mode of reading, the modes are defined in the table bellow:
  // Mode Resolution SampleTime
  //  0    0.5°C       30 ms
  //  1    0.25°C      65 ms
  //  2    0.125°C     130 ms
  //  3    0.0625°C    250 ms

  tcaselect(6);
  if (!temp2.begin(0x18)) {
    Serial.println("Couldn't find Temp2! Check your connections and verify the address is correct.");
    while (1);
  }

  Serial.println("Found MCP9808, Sensor 2!");

  temp2.setResolution(0);


  tcaselect(5);
  if (!temp3.begin(0x18)) {
    Serial.println("Couldn't find Temp3! Check your connections and verify the address is correct.");
    while (1);
  }

  Serial.println("Found MCP9808, Sensor 2!");

  temp3.setResolution(0);


}

void loop(void)
{

  delay(5000);
  getweight();

  tcaselect(7);
  //temp1.getEvent(&event);
  temperature1 = temp1.readTempF();
  //Display the results
  Blynk.virtualWrite(V7, temperature1);

  tcaselect(6);
  //temp2.getEvent(&event);
  temperature2 = temp2.readTempF();
  Blynk.virtualWrite(V6, temperature2);

  tcaselect(5);
  //temp3.getEvent(&event);
  temperature3 = temp3.readTempF();
  Blynk.virtualWrite(V5, temperature3);

  tcaselect(4);
  //hum4.getEvent(&event);
  humidity1 = hum1.readHumidity();
  Blynk.virtualWrite(V4, humidity1);

  tcaselect(3);
  //hum5.getEvent(&event);
  humidity2 = hum2.readHumidity();
  Blynk.virtualWrite(V3, humidity2);

  Blynk.virtualWrite(V2, 3)

  Blynk.run();


}/code]

Well, it's true. There is no declaration of the variable weight. It probably should be declared the same as
whatever scale.get_units(1) returns.

As the error says, weight was not declared anywhere in your code. You always need to declare variables before you use them in your code.

You do have a declaration here:

emtjim:

void getWeight()

{  //String weight = String(scale.get_units(1), 2);
 weight = scale.get_units(1);
}

but for some reason you commented it out.

You could fix the error by uncommenting that line, but the code is pointless. By declaring weight inside the getWeight function, you make it local to that function. When the function exits, weight goes out of scope, so you won't be able to access the weight reading anywhere else in your code. You could fix that by either making weight global by declaring it outside the getWeight function, or else change the return type of the getWeight function to String and return weight.

Paraphrasing the error message leaves out important information. Post the entire error message. There is a "copy error message" button in the lower right of the IDE window that makes it easy.