Problem with verifying code, 'sendCommand' was not declared in this scope

Hello,
This is my first time posting on a forum. So, please bare with me. I recently took over a project, which the project consisted of using a Arduino Mega with various as a data logger. I was able to install all the libraries that the previous person had and for some reason there an issue with the code. I am completely new to this where can someone tell me what can possible be wrong?

The hardware ill be using:
-Elegoo MEGA 2560
-Atlas scientific consumer grade pH scope #ENV-30pH
-Atlas scientific Lab Grade Dissolved Oxygen Probe #ENV-40-DOX
-wifi module esp8266

String getData = "GET /update?api_key=" + API + "&" + field + "=" + String(pH);
sendCommand("AT+CIPMUX=1", 5, "OK");
sendCommand("AT+CIPSTART=0,\"TCP\",\"" + HOST + "\"," + PORT, 15, "OK");
sendCommand("AT+CIPSEND=0," + String(getData.length() + 4), 4, ">");
esp8266.println(getData); delay(1500); countTrueCommand++;
sendCommand("AT+CIPCLOSE=0", 5, "OK");

delay(1000);

if (input_string_complete == true) { //if a string from the PC has been received in its entirety
Serial2.print(inputstringdo); //send that string to the Atlas Scientific product
Serial2.print('\r'); //add a <CR> to the end of the string
inputstringdo = ""; //clear the string
input_string_completedo = false; //reset the flag used to tell if we have received a completed string
from the PC
}

if (sensor_string_completedo == true) { //if a string from the Atlas Scientific product has been received in
its entirety
Serial.println(sensorstringdo); //send that string to the PC's serial monitor

//uncomment this section to see how to convert the D.O. reading from a string to a
float
if (isdigit(sensorstringdo[0])) { //if the first character in the string is a digit
DO = sensorstringdo.toFloat(); //convert the string to a floating point number so it can be evaluated
by the Arduino
if (DO >= 6.0) { //if the DO is greater than or equal to 6.0
Serial.println("high"); //print "high" this is demonstrating that the Arduino is evaluating the DO as
a number and not as a string
}
if (DO <= 5.99) //if the DO is less than or eq{ ual to 5.99
Serial.println("low"); //print "low" this is demonstrating that the Arduino is evaluating the DO as
a number and not as a string
}
}
}
Serial.println(DO);
delay(1000);

String getDatac = "GET /update?api_key=" + APIII + "&amp;" + field + "=" + String(sensorstringdo);
sendCommand("AT+CIPMUX=1", 5, "OK");
sendCommand("AT+CIPSTART=0,\"TCP\",\"" + HOST + "\"," + PORT, 15, "OK");
sendCommand("AT+CIPSEND=0," + String(getDatac.length() + 4), 4, ">");
esp8266.println(getDatac); delay(1500); countTrueCommand++;
sendCommand("AT+CIPCLOSE=0", 5, "OK");
delay(1000);

sensors.requestTemperatures();
double C = sensors.getTempCByIndex(0);
double F = C * 9 / 5 + 32;
Serial.println(F);
delay(1000);

String getDatatwo = "GET /update?api_key=" + API + "&amp;" + fieldb + "=" + String(F);

sendCommand("AT+CIPMUX=1", 5, "OK");
sendCommand("AT+CIPSTART=0,\"TCP\",\"" + HOST + "\"," + PORT, 15, "OK");
sendCommand("AT+CIPSEND=0," + String(getDatatwo.length() + 4), 4, ">");
esp8266.println(getDatatwo); delay(1500); countTrueCommand++;
sendCommand("AT+CIPCLOSE=0", 5, "OK");
delay(1000);
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
// don't do anything more:
return;
}
File dataFile = SD.open("datalog.txt", FILE_WRITE);
if (dataFile) {
dataFile.println(" ");
dataFile.println(" ");
dataFile.print(rtc.getDateStr());
dataFile.print(" ");
dataFile.print(rtc.getTimeStr());
dataFile.print(" ");
dataFile.print(pH);
dataFile.print(" ");
dataFile.print(DO);
dataFile.print(" ");
dataFile.print(F);
dataFile.close();
}
//else
//Serial.println("OOPS!! SD card writing failed");
delay(1000);

lcd.setCursor (0, 0); // go to start of 1nd line
lcd.print("Time: ");
lcd.print(rtc.getTimeStr());
lcd.setCursor (0, 1); // go to start of 2nd line
lcd.print("pH: ");
lcd.print(pH);
lcd.print(" ");
lcd.setCursor (0, 2 ); // go to start of 3nd line
lcd.print("DO: ");
lcd.print(DO);
lcd.setCursor (0, 3); // go to start of 4th line
lcd.print("Water Temp: ");
lcd.print(F);
delay(1000);
sensorstring = ""; //clear the string:
sensor_string_complete = false;
sensorstringdo = ""; //clear the string:
sensor_string_completedo = false;
}
void sendCommand(String command, int maxTime, char readReplay[]) {
Serial.print(countTrueCommand);
Serial.print(". at command => ");
Serial.print(command);
Serial.print(" ");
while (countTimeCommand < (maxTime * 1))
{
esp8266.println(command);//at+cipsend
if (esp8266.find(readReplay)) //ok
{

found = true;
break;
}
countTimeCommand++;
}
if (found == true)
{
Serial.println("OYI");
countTrueCommand++;
countTimeCommand = 0;
}
if (found == false)
{
Serial.println("Fail");
countTrueCommand = 0;
countTimeCommand = 0;
}
found = false;
}

Can you post the whole sketch, either in-line or as an attachment?

Can you also copy the entire error window (button at bottom right corner of IDE) and post it?

Well, I went through the code and think I found an extra brace. But the formatting was all messed up (comments wrapped badly, indents missing etc) so there may be more. Give the attached a try.

sketch_nov15e.ino (11.8 KB)