RF Relay Code

Hi all,
could someone have a look at this code and tell me what's wrong with it?

I am horribly newbish and have pieced it together by looking at examples given to me by those far better than I.

The details of what it does andwhy are in the comments at the top.

Any help is much appreciated.

/*
 Receiving/Beacon Unit code.
 
 The other (TX) unit will send out one of 2 messages:
 261 = when the TX is 'standing by', to allow this RX box to show it's getting a good RF signal.
 This will light up a green LED on this RX box (LED_RF_PIN).
 281 = when the TX has been triggered either manually using a button or by DMX.
 This will light up a blue LED and blue strobe (LED_PIN and BEACON_PIN).
 If neither 261 nor 281 are received, they should timeout and turn off the relative led/beacon.
 
 'readUInt' refers to the result of a basic error check, ensuring the serial link doesn't respond to garbage.
 This is performed in another sketch.
 
 As well as the above, there is a button on the RX box which will trigger the blue LED and strobe. 
 
 */


#define BUTTON_PIN     6      //Button (SPST, NO with pull down resistor)
#define LED_PIN        7      //Panic state LED (Blue LED)
#define LED_POWER_PIN  8      //Power Indicator (Red LED)
#define LED_RF_PIN     9      //Good RF link indicator (Green LED)
#define BEACON_PIN     10     //A relay which activates a blue 12V strobing beacon

#define TIMEOUT 500

int LEDTIMEOUT = 1000;
int buttonState = 0;               // variable for reading the pushbutton status
int rf_1 = readUInt(false);

unsigned long lightTime = 0;
unsigned long rfTime = 0;
unsigned long lastCorrectReception = 0;

boolean light_led = false;                 //'Panic State' blue strobe and LED
boolean rf_led = false;                    //good RF link LED indicator
boolean correctReceptionTIMEOUT = false;   //last time a good signal was received.

void setup() {                
  // initialize the digital pins as a outputs.
  // Turn off all LEDs except for the main power indicator
  // All other LEDs will turn on when Loop runs them
  pinMode(LED_PIN, OUTPUT);            //Panic State LED
  pinMode(LED_POWER_PIN, OUTPUT);      //Power Indicator
  pinMode(BEACON_PIN, OUTPUT);         //Beacon Relay
  pinMode(LED_RF_PIN, OUTPUT);         //Indicates good RF link
  pinMode(BUTTON_PIN, INPUT);          //test (&reset?) button
  pinMode(LED_RF_PIN, OUTPUT);         //Good RF Link Indicator

  digitalWrite(LED_PIN, LOW);          //Turn off Panic LED when powered up
  digitalWrite(LED_POWER_PIN, HIGH);   //Turn ON Power Indicator LED when powered up
  digitalWrite(LED_RF_PIN, LOW);       //Turn off Loop running LED when powered up
  digitalWrite(BEACON_PIN, LOW);       //Turn off beacon relay when powered up
  digitalWrite(LED_RF_PIN, LOW);       //Turn off Good RF indicator LED when powered up

  Serial.begin(300);                   //a low baud rate has been used to help increase signal range/distance.



}


void loop() {
  unsigned long timeNow = millis();
  rf_1 = readUInt(false);
 
  if(!correctReceptionTIMEOUT)       //if NOT timeout...
     {     
          // ---------------Check to see if panic signal (281) is coming in---------------
          if (rf_1 == 281)  
          {
            lightTime = timeNow;
            lastCorrectReception = timeNow;
            light_led = true;
            
          }
        //---------------Check to see if 'good RF signal' (261) is coming in---------------
          if (rf_1 == 261)  
          {
            rfTime = timeNow;
            lastCorrectReception = timeNow;
            rf_led = true;
          }
      }

  
     
if (timeNow > rfTime + LEDTIMEOUT)
    {
      rf_led = false;
    }
    
if (timeNow > lightTime + LEDTIMEOUT)
    {
      light_led = false;
    }
    

    //--------------overall timeout--------------    
  if (timeNow > lastCorrectReception + TIMEOUT)
      {
        correctReceptionTIMEOUT = true;
      }
        

 digitalWrite(LED_RF_PIN, rf_led);
 digitalWrite(BEACON_PIN, light_led);
 digitalWrite(LED_PIN, light_led);
 

}

Post you code using the # icon not the quote next to it.

Post all the code that as it stands will not compile will it.

Say what it does do not just, it will not work.