Error message: exit status 1 'printWifiStatus' was not declared in this scope

Hi! i cant figure out what i have done wrong or how to fix it??

It says: exit status 1
‘printWifiStatus’ was not declared in this scope. And i think it could be something with the library but i have installed both Softwareserial and WiFiesp and it still doesnt work…

What is wrong??

Code:

//include softwareserial and Wifi library
#include <SoftwareSerial.h>
#include <WiFiEsp.h>
#include <WiFiEspClient.h>
#include <WiFiEspServer.h>
#include <WiFiEspUdp.h>

//Create WiFi moduleobject in gpio pin 6 (RX) and 7 (TX)
SoftwareSerial Serial1(6, 7);

//Declare and intialise global arrays for Wifi settings
char ssid = “Kius”;
char pass = “12345678”;

//Declare and initialise variable for radio status
int status = WL_IDLE_STATUS;

void setup() {
// Initialize serial for debugging
Serial.begin(115200);

// Initialize serial for ESP module
Serial1.begin(9600);

//initialize ESP Module
WiFi.init(&Serial1);

// Check for presence of the shield
if (WiFi.status() == WL_NO_SHIELD) {
Serial.print(“WiFi shield not present”);

//don´t continue
while (true);
}
// Attempt to connect to WiFi network
while (status != WL_CONNECTED) {
Serial.print("Attempting to connect to SSID: ");
Serial.println(ssid);

// Connect to WPA/WPA2 network
status = WiFi.begin(ssid, pass);
}

Serial.println(“You’re connected to the network”);
printWifiStatus();
}

void loop()
void printWiFiStatus() {

//Print the ssid of the network
Serial.print("SSID: ");
Serial.println(WiFi.SSID());

//Print the Ip address
IPAddress ip = WiFi.localIP();
Serial.print("IP Address: ");
Serial.println(ip);
}

Did i post the code right? (first time on this forum) :wink:

void loop()
void printWiFiStatus() {

You can NOT define the printWiFiStatus() function here. Put it AFTER the body of loop().

Marcusskarlund:
Did i post the code right? (first time on this forum) :wink:

No.

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn’t show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.