Error in sketch

Hi, I have an error and do not know how to fix it, someone could help me? I’m a newbie.
I’m putting together a server LED’S and temperature record and humidity

Codigo_domotico.ino (9.73 KB)

Care to tell us what the error is, and what line it's on? I don't think I'm going to bother downloading a bunch of libraries just to test your code.

  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");

All executable code needs to be in a function. None of the code following this snippet is in a function. It's a good thing you figured this out before writing too much code.

312 lines and this is the first time you compiled?