HELP! I'm at a loss with script error codes

Hey I am trying to set 5 servos to an initial and final position for the set up for a robot hand that I am making, but i keep getting the error code of

/Users/mugiwara/Documents/Arduino/setup/setup.ino: In function 'void setup()':
setup:20: error: a function-definition is not allowed here before '{' token
void alltovirtual() {
^
setup:29: error: a function-definition is not allowed here before '{' token
void alltorest() {
^
setup:38: error: a function-definition is not allowed here before '{' token
void alltomax() {
^
exit status 1
a function-definition is not allowed here before '{' token

I am just using the code that was given with the design of the hand that should work, the script that I've got at the moment is

void setup() {

#include <Servo.h>

Servo servothumb;
Servo servoindex;
Servo servomajeure;
Servo servoringfinger;
Servo servopinky;

void setup(); {
servothumb.attach(2);
servoindex.attach(3);
servomajeure.attach(4);
servoringfinger.attach(5);
servopinky.attach(6);

}

void alltovirtual() {
servothumb.write(0);
servoindex.write(0);
servomajeure.write(0);
servoringfinger.write(0);
servopinky.write(0);

}

void alltorest() {
servothumb.write(0);
servoindex.write(0);
servomajeure.write(0);
servoringfinger.write(0);
servopinky.write(0);

}

void alltomax() {
servothumb.write(180);
servoindex.write(180);
servomajeure.write(180);
servoringfinger.write(180);
servopinky.write(180);

}
// put your main code here, to run repeatedly:

}

You seem to have void setup in there twice. I'm thinking only the second one belongs and it needs the semicolon removed. You will then need to remove the last curly brace too.

I removed the first void setup and the last curly bracket and it has now given me the error code:

setup:11: error: expected unqualified-id before '{' token
void setup(); {
^
exit status 1
expected unqualified-id before '{' token

did I remove the wrong void set up?

Delta_G thank you very much for your help, I started a new script and made the edits that you advised and it managed to work. Apologies for being a noob, I have just read through many of the other posts regarding how to properly ask for help and what not to do (realising how many of those mistakes I myself made in my first post) but am grateful for your assistance, I was freaking out a little bit before because coding is definitely not one of my strengths.

Thanks again.

I see a fair bit of code by new programmers with semicolons all over the place. Semicolons do something, they are not cupcake sprinkles.

Delta_G told you to remove the semicolon. The error message indicates that you did not.

What you posted is not a script, it is a C++ program (as are most Arduino programs).

You have not posted the latest version of your program.

In the future...

To post code and/or error messages:

  1. Use CTRL-T in the Arduino IDE to autoformat your code.
  2. Paste the autoformatted code between code tags (the </> button)
    so that we can easily see and deal with your code.
  3. Paste the complete error message between code tags (the </> button)
    so that we can easily see and deal with your messages.

Before posting again, you should read the three locked topics at the top of the Programming Questions forum, and any links to which these posts point.

If your project involves wiring, please provide a schematic and/or a wiring diagram and/or a photograph of the wiring.

Good Luck!