LOOKing in a direction

Hi

I’m trying to do exactly what is shown in the example 6.14 whereby I want to allow the player to look in a direction and see the description of the room in that direction.

When I try the example code as below, I get the error shown;

Understand "look [direction]" as facing. 

Facing is an action applying to one visible thing. 

Carry out facing: 
	let the viewed item be the room noun from the location; 
	if the viewed item is not a room, say "You can't see anything promising that way." instead; 
	try looking toward the viewed item.

Error is:

Problem. You wrote 'try looking toward the viewed item'  : but this is not an action I recognise, or else is malformed in a way I can't see how to sort out.

Any ideas why?

The example (Ex. 80, “A View of Green Hills”) continues by defining the action “looking toward”:

Understand "look toward [any adjacent room]" as looking toward. Understand "examine [any adjacent room]" as looking toward.

Looking toward is an action applying to one visible thing.

Carry out looking toward:
	say "You make out [the noun] that way."

If you add that to your code, it should work.

2 Likes