serial read

hi
am trying to read data from my RFID but i get nothing in the serial monitor, have editted a code i got online to suite my application can any one spot a fault.

// RFID reader for Arduino
// Wiring version by BARRAGAN http://people.interaction-ivrea.it/h.barragan
// Modified for Arudino by djmatic
// re-modified by me

int val = 0;
char code[37];
int bytesread = 0;

void setup() {

Serial.begin(9600); // RFID reader SOUT pin connected to Serial RX pin at 9600bps
// Activate the RFID reader
}

void loop() {

if(Serial.available() > 0) { // if data available from reader
if((val = Serial.read()) == ‘$’) { // check for header
bytesread = 0;
while(bytesread<37) { // read 37 digit code
if( Serial.available() > 0) {
val = Serial.read();
if((val == ‘$’)||(val == ‘#’)) { // if header or stop bytes before the $ digit reading
break; // stop reading
}
code[bytesread] = val; // add the digit
bytesread++; // ready to read next digit
}
}
if(bytesread == 37) { // if 37 digit read is complete
Serial.print("TAG code is: "); // possibly a good TAG
Serial.println(code); // print the TAG code
}
bytesread = 0;
// deactivate the RFID reader for a moment so it will not flood
delay(1500); // wait for a bit
// Activate the RFID reader
}
}
}

Serial.begin(9600); // RFID reader SOUT pin connected to Serial RX pin at 2400bps

A baud 9600 is very different from 2400. Is the comment wrong or is this your real problem ? The baud must be the same

Serial.println(code); // print the TAG code

You haven't terminate the char array to be a string and so you cant print it (if you want some useful stuff to be printed) Looking to your code is a pain. It's a mess. You should check is you have data on serial buffer and if you have something read it as fast as you can.Then process that data

i hv editted the comments thnx can still see any faults

Are you trying to use the hardware serial port to talk to the RFID reader or the PC? Both is the wrong answer.