Problem trying to run "Getting Started: Your first code 'Hello World"

I am getting the following messages repeated:

2015-01-27 10:24:18 UTC-5 [Agent] ERROR: the index ‘hardware’ does not exist
2015-01-27 10:24:18 UTC-5 [Agent] ERROR: at main:2

I copy and pasted the the following code:

`// create a global variabled called led and assign pin9 to it
led <- hardware.pin9;

// configure led to be a digital output
led.configure(DIGITAL_OUT);

// create a global variable to store current state of the LED
state <- 0;

function blink() {
// invert the value of state:
// when state = 1, 1-1 = 0
// when state = 0, 1-0 = 1
state = 1-state;

// write current state to led pin
led.write(state);

// schedule imp to wakeup in .5 seconds and do it again.
imp.wakeup(0.5, blink);
}

// start the loop
blink(); `

Have you accidentally pasted device code into the agent window?

yes. Where should I be pasting it?

Oops!

I now put the code in the device window and everything is working fine.