Trouble making a device alter its description.

I have been dabbling with inform for a few years – never to completion on anything, and very sporadically. I picked it up again for the first time in ages, and remembered what stopped me last time –– I can’t seem to get a TV to alter its description. When I code this:

[code]The Lounge is a room. A television is a kind of device.

The TV is a television in the lounge. The description of the TV is “[if on] Static covers the screen.[otherwise]You see your sad black reflection in its Stygian screen.”[/code]

I get a coding ERROR – expecting a condition, and not understanding “on”. But I know that devices can be on or off. If I ad a little bit:

[code]The Lounge is a room. A television is a kind of device. A television can be on or off.

The TV is a television in the lounge. The description of the TV is “[if on] Static covers the screen.[otherwise]You see your sad black reflection in its Stygian screen.”[/code]

while it will compile – it won’t enact the different descriptions for the different states.

I have had a good look around various documentation, and I have tried to do this in the simplest way possible – but there is just something very basic that I am just not getting here. I am sure someone can easily point out the error of my ways – and I will go; “Ahhhh!!!”, and maybe even take my next step down making an IF one day.

To be specific (and you need to be specific), that’s not entirely true. Devices can be switched on or switched off:

The description of the TV is "[if switched on] Static covers the screen.[otherwise]You see your sad black reflection in its Stygian screen."

(See ch. 3.14 in the manual.)

Ahhhh!!! Yep. That’s it. I would never have got that on my own. I read 3.14, and it never clicked with me to refer to the term “switched”. My lesson here is to take the documentation extremely literally, even in the bits that aren’t code samples.

Thanks.

Also pay attention to the index, which lists all the properties like this.