I am trying to set up a few rooms. For the sake of an example, these rooms are:
On A Muddy Path
Therefore, I have:
The Pier is a room.
West of The Pier is On A Muddy Path.
Now, the The of The Pier, once compiled, just displays the room as Pier, dropping the The.
On A Muddy Path causes a compilation failure, presumably due to the word On.
I’ve tried putting the room names within both single and double quotes, to no avail.
i.e. ‘The Pier’ is a room, which returns ‘The Pier’, with those quotes. “The Pier” is a room fails.
In what way, then, can I intercept the name of a room object with a title to a room object?
Try “There is a room called The Pier.”
ETA: I’m not having the problem with “On a Muddy Path.”
“On a Muddy Path” might be a problem if you have a Muddy Path room (or object). Not sure, though.
You can customize these names more precisely by saying, e.g.,
The printed name of Muddy Path is “On a Muddy Path”.
Another way is to say “The The Pier is a room.” although that may have unseen side effects I’m not aware of.
As a general rule when creating rooms, it is best to create then with names such as “The Muddy Path” (ie. starting with “the” if not proper named) and then use the printed name property to change the printed name to something like “On a Muddy Path”, as zarf mentions above. It makes the rest of the code a lot easier to work with.
Thanks, guys. I’ll try that when I get a chance. Makes sense, certainly.