funct-definition problem

The following program I have made is to control a modified servo by using four inputs, but after spending hours fixing problems in my code there that I don't know how to fix which is within one of the functions I call.

When I go to compile my program I get the following error

"a function-definition is not allowed here before '{' token"

which the error is for, the bracket after I call the void rotate() function. I have read through other forum discussions on this but still have not been able to fix it, if somebody who knows what my problem might be could point me in the right direction it would be hugely appreciated.

Cheers Brook

#include <Servo.h>

void Rotate();
void Empty();
void Rotatetwo();

const int fill = 1; //Button to feed pin1
const int oneEighty = 2; //180 deg sensor pin2
const int threeSixty = 3; //360 deg sensor pin3
const int full = 4; //tray full sensor pin4
const int food = 5; //trigger food pin5
const int drop = 6; //drop bowl pin6

int fillvar = 0; //variable for fill
int oneEightyvar = 0; //variable for 180deg sensor
int threeSixtyvar = 0; //variable for 360deg sensor
int fullvar = 0; //variable for bowl full
int foodvar = 0; //variable for triggering food
int dropvar = 0; //variable for dropping bowl

Servo Servotray; //Define Servotray

void setup()
{
Servotray.attach(9); //Servotray pin9

//set pin modes
pinMode(fill, INPUT);
pinMode(oneEighty, INPUT);
pinMode(threeSixty, INPUT);
pinMode(full, INPUT);
pinMode(food, OUTPUT);
pinMode(drop, OUTPUT);
}

void loop()
{
//test switches
fillvar = digitalRead(fill);
oneEightyvar = digitalRead(oneEighty);
threeSixtyvar = digitalRead(threeSixty);

//if fill is pressed
if(fillvar == HIGH)
{
digitalWrite(food, HIGH); //trigger filling bowl with food
delay(4000); //wait 4s
digitalWrite(food, LOW); //Stop filling bowl
Rotate();
}

void Rotate()
{
Servotray.write(180); //Rotate servo
if(oneEightyvar == HIGH) //tray at 180 deg
{
Servotray.write(90); //Stop servo
Empty();
}
}

void Empty()
{
if(fillvar == LOW) //Bowl empty
{
Rotatetwo();
}
}

void Rotatetwo()
{
Servotray.write(180); //rotate servo
if(threeSixtyvar = HIGH) //360deg sensor triggered
{
Servotray.write(90); //stop servo
digitalWrite(drop, HIGH); //drop bowl
}
}
}

You're trying to define a function within a function:

void loop()
{
  ...
  void someFunction()
  {
  ...
  }
}

Functions should be separate and not nested:

void loop()
{
  ...
}

void someFunction()
{
  ...
}

Thanks for the help.