help! i have sped 2 days trying to figure out whats wrong but no luck!

here is my code:



/*
This code is in the public domain
For use with "Link2fs_Multi"
Jimspage.co.nz
My thanks to the Guys that gave me snippets of code.

This sets the complete Arduino card for "keys" input except pin 13.
Attach a switch to any pin (except 13) and program that pin in "Multi"
Pin 13 is used for the servo to indicate flaps.
For this servo code to work you must tick " Everything to do with "Keys" starts with a "K" in this code.


*/


#include
Servo vsiServo;






int CodeIn;// used on all serial reads
int KpinNo;
int Koutpin;
String vsi;


String KoldpinStateSTR, KpinStateSTR, Kstringnewstate,Kstringoldstate;


void setup()
{
Kstringoldstate = "111111111111111111111111111111111111111111111111111111111111111111111";

for (int KoutPin = 2; KoutPin < 70; KoutPin++)// Get all the pins ready for "Keys"
{
pinMode(KoutPin, INPUT);
digitalWrite(KoutPin, HIGH);
}
Serial.begin(115200);
pinMode(9, OUTPUT);// For the servo.
vsiServo.attach(9);

}


void loop() {
{KEYS();} //Check the "keys" section
if (Serial.available()) {
CodeIn = getChar();
if (CodeIn == '=') {EQUALS();} // The first identifier is "="
if (CodeIn == '<') {LESSTHAN();}// The first identifier is "<"
if (CodeIn == '?') {QUESTION();}// The first identifier is "?"
if (CodeIn == '/') {SLASH();}// The first identifier is "/" (Annunciators)
}


}


char getChar()// Get a character from the serial buffer
{
while(Serial.available() == 0);// wait for data
return((char)Serial.read());// Thanks Doug
}


void EQUALS(){ // The first identifier was "="
CodeIn = getChar(); // Get another character
switch(CodeIn) {// Now lets find what to do with it
case 'A'://Found the second identifier
//Do something
break;

case 'B':
//Do something
break;

case 'C':
//Do something
break;
}
}


void LESSTHAN(){ // The first identifier was "<"
CodeIn = getChar(); // Get another character
switch(CodeIn) {// Now lets find what to do with it
case 'A'://Found the second identifier
//Do something
break;

case 'B':
//Do something
break;

case 'L'://Found the second identifier ("G" Flaps position)
vsi = "";
vsi += getChar();
vsi += getChar();
vsi += getChar();
int vsiint = vsi.toInt();
vsiint = vsiint * 0.03; // getting a big number down to servo degrees
vsiint = (vsiint + 90); //making it so 0 on the isntrument is = to 90 degrees
if((vsiint) > 90 && vsiint < 151) // chacking if its positive (for now until i get it working ill attempt negatives)
vsiServo.write(vsiint); //wirting it
break;
}
}


void QUESTION(){ // The first identifier was "?"
CodeIn = getChar(); // Get another character
switch(CodeIn) {// Now lets find what to do with it
case 'A'://Found the second identifier
//Do something
break;

case 'B':
//Do something
break;

case 'C':
//Do something
break;
}
}
void SLASH(){ // The first identifier was "/" (Annunciator)
//Do something
}
void KEYS()
{
Kstringnewstate = "";
for (int KpinNo = 2; KpinNo < 70; KpinNo++){
KpinStateSTR = String(digitalRead(KpinNo));
KoldpinStateSTR = String(Kstringoldstate.charAt(KpinNo - 2));
if (KpinStateSTR != KoldpinStateSTR)
{
if (KpinNo != 13){
//Serial.print ("D");
//if (KpinNo < 10) Serial.print ("0");
// Serial.print (KpinNo);
// Serial.println (KpinStateSTR);
}
}
Kstringnewstate += KpinStateSTR;
}
Kstringoldstate = Kstringnewstate;
}






any help is great!