Controlling multiple servos

I am intending to control the points/switches on a model train layout using multiple small RC servos and an arduino duemilanove. I have made a voltage splitter with rows of 3 double pole double throw switches . I intend to use the AnalogRead function to read the position of the switches, and control the servos in an all or nothing kind of fashion below is the output of the voltage splitter using analogSerial , 0 indicates switch left, 1 indicates switch right.

Switch Left=o Digital
ooo 1023
ool 551
olo 692
oll 219
loo 803
lol 329
llo 471
lll 0

I am starting with 1 splitter comprising 3 switches giving 8 combinations. This way I will control 3x3 servos on I/O pins with only a 3 analog pins using the SoftwareServo library.
Till I get things working I am just writing a sketch for 3 switches and 3 servos.

I have not passed the verify stage yet, here is the error message
""In function 'void loop()':
error: request for member 'write' in 'Servo1', which is of non-class type 'int' At global scope: ""

Here is my sketch

#include <SoftwareServo.h>


int InPin1 = 1;
int Servo1 = 1;
int Servo2 = 2;
int Servo3 = 3;
int val123 = 0;


void setup ( )
{

 pinMode(1, OUTPUT);
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);


int InputPin1 = (1) ; 

}

void loop()
{
  
  val123 = analogRead(InPin1); 
  
  if (val123 >= 1000 && InPin1 < 1023)            //Switches LLL [glow]OK till here[/glow]
Servo1.write(1);
  Servo2.write(1);
  Servo3.write(1);}


else if (InputPin1 => 500 && InputPin1 < 590)            //Switches LLR
{
servo write 1 = 1
servo write 2 = 1
servo write 3 = 178


else if (InputPin1 => 600 && InputPin1 < 750)            //Switches LRL
{
servo write 1 = 1
servo write 2 = 178
servo write 3 = 1

else if (InputPin1 => 200 && InputPin1 < 280)            //Switches LRR
{
servo write 1 = 1
servo write 2 = 178
servo write 3 = 178

else if (InputPin1 => 780 && InputPin1 < 820)            //Switches RLL
{
servo write 1 = 178
servo write 2 = 1
servo write 3 = 1

else if (InputPin1 => 300 && InputPin1 < 360)            //Switches RLR
servo write 1 = 178
servo write 2 = 1
servo write 3 = 178

else if (InputPin1 => 450 && InputPin1 < 490)            //Switches RRL
servo write 1 = 178
servo write 2 = 178
servo write 3 = 1

else (InputPin1 => 0 && InputPin1 < 100)            //Switches RRR
servo write 1 = 178
servo write 2 = 178
servo write 3 = 178

I am open to any suggestions of better ways to do this
Aim, control 11 servos using Duemilanova, 3x3 on voltage splitters, 1 on a single switch voltage splitter and 1 on a pot.

You need to declare "Servo1" as type "Servo", not as an "int", which presumably is the number of the pin to which you want to attach the servo.

Thanks for the help Groove. I have learned that bit, Now I can't understand why I am getting the following error message.

In function 'void loop()':
error: 'else' without a previous 'if

when I try to validate the following code. I have changed everything I can think of to get it to recognise the first IF.

//Will get title

#include <SoftwareServo.h>
 SoftwareServo Servo1,Servo2,Servo3;                        //Declare Servos

int InPin1 = 1;

int val123 = 0;

void setup ( )

{
 pinMode(1, OUTPUT);
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);

int InputPin1 = (1) ; 
}

void loop()

{  
val123 = analogRead(InPin1); 

 
 if (val123 >= 1000 && val123 < 1023);                    //Switches LLL 

{
  Servo1.write(1);
  Servo2.write(1);
  Servo3.write(1);
}

[glow]else if {(val123 => 500 && val123 < 590)      [/glow]      //Switches LLR

Servo1.write(1);
  Servo2.write(1);
  Servo3.write(178);
}

else if (val123 => 600 && val123 < 750)            //Switches LRL
{
servo write 1 = 1
servo write 2 = 178
servo write 3 = 1
}
else if (val123 => 200 && val123 < 280)            //Switches LRR
{
servo write 1 = 1
servo write 2 = 178
servo write 3 = 178
}

Help will be much appreciated

if (val123 >= 1000 && val123 < 1023)[glow];[/glow]

That semi-colon terminates the if statement. Then, there is a block of code, then an else with no if.

else if [glow]{[/glow](val123 => 500 && val123 < 590)

That { is also misplaced.

This :

void setup ( )

{
 pinMode(1, OUTPUT);
 pinMode(2, OUTPUT);
 pinMode(3, OUTPUT);

[glow]int InputPin1 = (1) ;[/glow]
}

may cause you some head-scratching in the future - you're declaring an "int" variable called "InputPin1" and assigning it the value 1 (the parentheses aren't needed BTW), mere nanoseconds before this variable goes out of scope, never to exist until next time you hit reset.

If you've already got a global called "InputPin1", and you want to initialise it to 1 in "setup", leave off the type specifier "int".,