connectWiFi' was not declared in this scope

Hi, i am new in arduino programming, Please help me to solve this issue..kindly attahched error

#include <WiFi.h>
#include <DHT.h>
#include <Wire.h>
#include <SoftwareSerial.h>
#include <stdlib.h>
#include <SFE_BMP180.h>
SFE_BMP180 pressure;
#define DHTPIN 5
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);
#define TEMPTYPE 0
#define ALTITUDE 160 // Altitude from Bussero (MI) Italy
#define ssid "Enter Your WiFi Name Here " // "WiFi Name"
#define pass "WiFi Password" // "Password"
#define server = "api.thingspeak.com";
String apiKey ="Enter the API Key";
char buffer[10];
char t_buffer[10];
char h_buffer[10];
char P_buffer[10];

SoftwareSerial ser(2, 3); // RX, TX
void setup() {
Wire.begin();
pressure.begin();
// enable debug serial

Serial.begin(9600);
Serial.println("AT");
delay(5000);
if(Serial.find("OK")){
connectWiFi();

}
void loop()
{
Trsmission(); // ESP8266
delay(60000); // 60 seconds
}

void Trsmission()
{
int8_t h = dht.readHumidity();
int16_t t = dht.readTemperature(TEMPTYPE);
char status;
double T,P,p0,a;
status = pressure.startTemperature();
if (status != 0)
{
delay(status);
status = pressure.getTemperature(T);
if (status != 0)
{

status = pressure.startPressure(3);
if (status != 0)
{
// Wait for the measurement to complete:
delay(status);

status = pressure.getPressure(P,T);
if (status != 0)
{

p0 = pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)
a = pressure.altitude(P,p0);
}
else Serial.println("error retrieving pressure measurement\n");
}
else Serial.println("error starting pressure measurement\n");
}
else Serial.println("error retrieving temperature measurement\n");
}

float temp = t;
float humidity = h;
float Pression = p0;

String strTemp = dtostrf(temp, 4, 1, t_buffer);
String strHumid = dtostrf(humidity, 4, 1, h_buffer);
String strPres = dtostrf(Pression, 4, 2, P_buffer);

Serial.print("Temperature: ");
Serial.println(strTemp);
Serial.print("Humidity: ");
Serial.println(strHumid);
Serial.print("Pression: ");
Serial.println(strPres);

String cmd = "AT+CIPSTART="TCP","";
cmd += "184.106.153.149"; // api.thingspeak.com
cmd += "",80";
ser.println(cmd);
if(ser.find("Error")){
Serial.println("AT+CIPSTART error");
return;
}
if(ser.find("Error")){
Serial.println("AT+CIPSTART error");
return;
}

// prepare GET string
String getStr = "GET /update?api_key=";
getStr += apiKey;
getStr +="&field1=";
getStr += String(strTemp);
getStr +="&field2=";
getStr += String(strHumid);
getStr +="&field3=";
getStr += String(strPres);
getStr += "\r\n\r\n";

// send data length
cmd = "AT+CIPSEND=";
cmd += String(getStr.length());
ser.println(cmd);
//ser.print(getStr);
if(ser.find(">")){
ser.print(getStr);
}
else{
ser.println("AT+CIPCLOSE");
// alert user
Serial.println("AT+CIPCLOSE");
ser.println("AT+RST");
}

char buffer[10] = "";
}

A very helpful troubleshooting tool is the Auto Format feature (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor). If you do an Auto Format and then compare the resulting indentation to your intended program structure, it will quickly point you to where there is a missing or extra brace.

Another useful feature of the Arduino IDE/Arduino Web Editor is that when you place the cursor next to one bracket, it puts a box around the matching bracket. In the Arduino IDE, if the cursor is next to the closing bracket and the opening bracket is off the screen then it will show the opening bracket line in a tool tip after a short delay.

Another useful tool is Read this before posting a programming question.