Need help on programming code

I did some code below and i tried run the code but cant because some error been detected which i couldn't understand. My task only to send binary data when a pushbutton is pressed.

int crankingPin = 3
int liftoffPin = 4
int upwardPin = 5
int downwardPin = 6
int turnleftPin = 7
int turnrightPin = 8
int forwardPin = 9
int backwardPin = 10

void setup()
{
// initialize the serial communication:
Serial.begin(9600);

// initialize the ledPin as an output:

pinMode(crankingPin, INPUT);

}

void loop()
{
buttoncrankingState = digitalRead(crankingPin);
if (buttoncrankingState == HIGH)
{
Serial.write(8 , BIN);
delay(1000);
}
}

this code not working.Pls anyone can rectifier it.PLS help me

In C++, every variable needs to have a type.

 buttoncrankingState = digitalRead(crankingPin);

There is no type defined for buttoncrankingState. It should have "int " in front, to define the type.

You might also want to have an else clause, to be sure that the switch is working correctly.

You are not using the internal pull-up resistor. This implies that you have an external pull-down resistor with the switch. Is that true?

I didnt get what you trying to say about pull up resistor. But the program i change to be like below. Can you have a look my code?

int crankingPin = 3;
int liftoffPin = 4;
int upwardPin = 5;
int downwardPin = 6;
int turnleftPin = 7;
int turnrightPin = 8;
int forwardPin = 9;
int backwardPin = 10;

void setup()
{
// initialize the serial communication:
Serial.begin(9600);

// initialize the ledPin as an output:

pinMode(crankingPin, INPUT);
pinMode(liftoffPin, INPUT);
pinMode(upwardPin, INPUT);
pinMode(downwardPin, INPUT);
pinMode(turnleftPin, INPUT);
pinMode(turnrightPin, INPUT);
pinMode(forwardPin, INPUT);
pinMode(backwardPin, INPUT);
}

void loop()
{ if
(digitalRead(crankingPin)==HIGH);
Serial.write(8 , BIN);
delay(1000);
}

if(digitalRead(crankingPin)==HIGH);

The body of the statement (the code to be executed if the evaluation is true) is ;. That, effectively, means do nothing, regardless of whether the condition evaluates to true or not.

What did you have against storing the value for digitalRead in a variable?

You have a lot to learn about how the Arduino works with switches. http://arduino.cc/en/Tutorial/Button and http://arduino.cc/en/Tutorial/Debounce

Presuming that you get the hardware and code straightened out to properly detect a switch press, why do you want to write 8, in binary, to the serial port?

i want to transmit binary data and another arduino will receive the binary and execute certai routine(controlling motor speed)