Closed DavidGriffith closed 8 years ago
It turns out that this is not a bug in the Library or Compiler, but in the test code itself. The code for the window is wrong. It should look this this instead:
Object -> window "window"
with name 'window',
description "Framed by celery green curtains, you see nothing special about the window.",
Before [;
Climb,Enter:
print "You squeeze yourself into the window and fall out the other side.^",
PlayerTo(backyard);
rtrue;
],
has scenery container openable;
Specific problems:
@scott-martinez, I suspect you were very tired when you wrote that. I've done similar things myself.
Originally reported in #18 by @scott-martinez . Separate problems -- separate issue reports.
Here's some sample code where, if you go through the window, you end up in your neighbor's back yard but a spurious "1" is printed after the description of the back yard.
Constant NO_SCORE; Constant Story "Test"; Constant Headline "^A sample.^"; Include "Parser"; Include "VerbLib";
Object kitchen "Kitchen" with description "You are in a kitchen. There is a window here which you should try to go through.", has light;
Object window "window" kitchen with name 'window', description "Framed by celery green curtains, you see nothing special about the window.", Before [; Climb,Enter: print_ret "You squeeze yourself into the window and fall out the other side.^", PlayerTo(backyard); ], has scenery container openable;
Object backyard "Back Yard" with description "You are in your neighbor's back yard. It is barely cloudy and already hot this morning. The healthy, dark green grass is well manicured. A high wooden fence encompasses the area, painted a burnt umber. The back door is to the east. Your kitchen window is to the south.", before [; Go: if (noun == s_obj) { print "Climbing over the fence you squeeze back through your kitchen window.^"; } ], s_to kitchen, has light;
[ Initialise;
Location = Kitchen;
];
Include "Grammar";