Compiling Error for my Project

Hi everybody, I'm currently doing my Graduate Project with Arduino and XBee Series 1 (XB24, 802.15.4) and i've never used Arduino before. I would really appreciate your help because i've tried this the entire day and it still won't compile. I tried searching the web as well but nothing.

Here is my code:

 // NODE 1

 #define VERSION "1.00a0"

 int FAN1 = 8;
 int SENSOR1 = 7;

 void setup()
 {
   pinMode(SENSOR1, INPUT);
   pinMode(FAN1, OUTPUT);
   Serial.begin(9600);
 }

 void loop(){
  // Look for capital P over the serial port and turn on the 'FAN' when found
  if (Serial.available() > 0){
     (Serial.read() == 'P'){
      digitalWrite(FAN1, HIGH);
      delay(10);
      // Send feedback message that SENSOR1 had been triggered and FAN is ON
      (Serial.print('K');
  else
  {
    digitalWrite(FAN1, LOW);
  }
     }
  }
 // If Sensor is triggered, turn the FAN off and send acknowledgement that Sensor is triggered and FAN is OFF
     if digitalRead(SENSOR1, HIGH){
        delay(10);
        digitalWrite(FAN1, LOW){
        delay(10);
        }
        Serial.print('J');
     }
 }

(I know my code is a mess. I apologised in advance)

Anyway, I got multiple error while trying to compile this:

_2way_Com_END1_R1.ino: In function 'void loop()': _2way_Com_END1_R1:18: error: expected ;' before '{' token _2way_Com_END1_R1:37: error: expected}' at end of input _2way_Com_END1_R1:37: error: expected `}' at end of input

I don't think the error is anything major at all. Is there something i missed out or did i add something that should not be there? I would really appreciate all of your help. I thank you all in advance.

     (Serial.read() == 'P'){

What is this supposed to do? Compare the value of the character just read to 'P', and then throw away the result. How is that useful?

Every { belongs on a new line. Use Tools + Auto Format to properly indent that mess.

     (Serial.print('K');

(Why (is (there (an (open (parenthesis (there (?

     if digitalRead(SENSOR1, HIGH){

Wrong. The digitalRead() function only takes one argument.

As was properly noted... You do have some errors in your code and seem somewhat unfamiliar with writing C or C++ code for any processor... What attempt did you make to correct the error messages returned in the compiler output...? What research did you do first? there are many examples of serial communications for control purposes... Did you make an attempt to find any and compare your code with them... [u]When in doubt, remember Mr Google is your personal friend...First...[/u] A quick examination of your code shows that at best you are most unfamiliar with the use of the IDE as well. Ctrl T is the autoformat command... IT would be a good idea to become familiar with it as your code is at best rather incomprehensible...? IF the IDE autoformat tool returns an error... it generally is a good idea to find and fix it as the code has little chance of working and while there are error messages that are just warnings, yours are all of the fatal kind...

Doc