Problems with Relations

Hey guys,

Just been trying to work out relations and I can’t seem to get my head around what i’m doing wrong. I’ve been experimenting with an elevator implementation, and i’m trying to relate a call button for the elevator to the elevator itself, so that you can reference the correct elevator from the button. Code below (only relevant pieces shown for simplicity’s sake):

An elevator is a kind of room. 
An elevator call button is a kind of thing. An elevator call button is scenery.

Elevator-Connect relates one elevator (called the target) to one elevator call button.
The verb to connect (he connects, they connect, he connected, it is connected) implies the Elevator-Connect relation.

The Main Elevator is an elevator.
The call button is an elevator call button in the Top Floor Lobby.

The Main Elevator connects to the call button.

Instead of pushing or touching the call button:
	Say "The call button lights up, bright and optimistic. [the target of the call button] is coming!";

Now when I run this code it compiles fine. When I run the “Relations” command I get the following:

This suggests to me that the relation has been correctly set… however, when I press the call button, I get the following:

Despite the fact that the relation appears to be set, the [the target of call button] is parsing to “Nothing”.

Can anyone see where i’ve made a mistake here?

Thanks!
Frater

Yeah, this is subtle. If you inspect the World index tab (or type TREE), you’ll see that you’ve created two distinct objects: “call button” and “to the call button”.

Why? Because your connection verb doesn’t include “to”. In the line “The Main Elevator connects to the call button,” the verb is “connect” and so the object must be “to the call button”.

You want:

The verb to connect to (he connects to, they connect to, he connected to, it is connected to) implies the Elevator-Connect relation.

Legendary, that was the answer. Thanks a lot Zarf :wink: I am so continually blown away by how excellent the natural language syntax is, it’s easy to miss things like that.

Now, onwards!