The Crafte or Atomes Development Questions

I am developing an IF game for a major school project. In the development of the game I have run into several issues. I am creating this topic so I can seek help on them.

Problem the First:

I am trying to get a device to give two different text outputs when it contains two different items and another if it’s empty.
This is my current code for the device (with a few substitutions of names and results):

Every turn when the location of the player is the location of the Cassette Player: if the Cassette Player contains the White Cassette Tape: say "White Tape output."; else: if the Cassette Player contains the Green Cassette Tape: say "Green Tape output."; otherwise: say "Empty output." .
The Cassette player has a capacity of 1 so having both tapes in is not a problem.

Is there something simple I’m overlooking?

Depends on what you mean by “text output”. If you mean the description you get when you examine the cassette player, you’d just do something like this:

The description of the cassette player is "[if the cassette player contains the white cassette tape]foo[otherwise if the cassette player contains the green cassette tape]bar[otherwise]bluh[end if]."

If you’re talking more like an ambient sound that you want to play whenever the player can hear the cassette tape, the code you’ve got should work, but the syntax would be more like this:

Every turn while the cassette player is visible: if the Cassette Player contains the White Cassette Tape: say "White Tape output."; otherwise if the Cassette Player contains the Green Cassette Tape: say "Green Tape output."; otherwise: say "Empty output."

However, to be really thorough, I’d do something like this:

[code]A recording medium is a kind of thing. A recording medium has a text called a recorded message.

The white cassette tape is a recording medium. It is in the starting room. The recorded message of the white cassette tape is “This is the white tape’s recorded message.”

The green cassette tape is a recording medium. It is in the starting room.

The Starting Room is a room.

The cassette player is an openable container in the starting room. The carrying capacity of the cassette player is 1.

Check inserting into the cassette player:
if the noun is not a recording medium:
say “That doesn’t fit.”;
stop the action.

Every turn while the cassette player is visible:
if the cassette player contains a recording medium (called the tape):
if the recorded message of the tape is not “”:
say the recorded message of the tape;
otherwise:
say “You hear only a hiss of static.”[/code]

Thank you.

A point of style: a text that is equal to “” can be described as empty, e.g.

if the recorded message of the item described is not empty: