X-ZC-TELEFON: 0212 - 79319
X-ZC-POST: Hermann-Loens Weg 28, 42697 Solingen, Germany
X-Mailer: MicroDot 1.12 [REGISTERED 004f2d] via ANUBIS V 1.01d / ZSort V 1.47a
Message-ID: <y3ZmtMD4F2DaUz1@trib0029.tribal.line.org>
Organization: LINE-Mailboxsysteme, Langenfeld/Rheinland
X-Gateway: ZCONNECT GF gismo.gun.de [DUUCP BETA vom 06.11.1996]
From: omueller@tribal.line.org (Olav Mueller)
Subject: [Inform] 6.10 another problem
Date: 16 Jan 1997 01:59:57 +0100
Path: nntp.gmd.de!newsserver.jvnc.net!goliath.montclair.edu!rutgers!news.cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!nntp-xfer-1.csn.net!su-news-hub1.bbnplanet.com!news.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.sprintlink.net!news-peer.sprintlink.net!news.radio.cz!CESspool!news.apfel.de!fu-berlin.de!news.gtn.com!gismo.gun.de!tribal.line.org!trib0029.tribal.line.org!omueller
Newsgroups: rec.arts.int-fiction
Distribution: world
Lines: 201

Hi,

    this time I am REALLY lost. Have a look at this small excerpt
(I  removed  anything  remotely interesting ...) from some code I
wrote (originally using Inform 6.03 with  library  6/1,  recently
switched  to  6.10  with  library  6/3  ... and that is where the
problems began!)

-------------------- code: Apprentice.inf -----------------------
Release 1;
Constant Story "THE APPRENTICE";
Constant Headline "^An Interactive Transformation^\
             Copyright (c) 1996 by Olav M@:uller.^\
             (First-time players should type ~about~.)^";

Include "Parser";
Include "VerbLib";

Object player_as_rabbit "yourself"
    with
        number thedark,
        orders [;
            Take, Eat:
                if( noun has edible ) {
                    give paradise general;
                    "Eating carrots ...";
                }
        ],
    has concealed animate proper transparent;

Object paradise "Everything you ever wanted!"
    with
        cant_go [;
            if( self hasnt general )
                "You wouldn't leave this place now, would you? (eat carrots first)";
            "You can't go this way.";
        ],
        description "  Paradise! That's the first description ... ",
    has light;

Nearby carrots "carrots"
    with
        name "carrots" "carrot",
        description "  Looking at all these carrots, ...",
   has edible;

[ Initialise;
    location = paradise;

    move player_as_rabbit to paradise;
    ChangePlayer( player_as_rabbit );

    print "^^^  BINGO! YES!!! This time you definetly hit the jackpot. After all ...^";

    ! returning 2 from Initialise() will not print Banner()
    return 2;
];

Include "Grammar";

Extend "eat" replace
    * edible                                -> Eat;

end;
-------------------- end: Apprentice.inf ------------------------

    This compiles with no error at all on my computer (Amiga,  as
if it should matter ...) using only -csxDU command line switches.

    After I "eat  carrots"  the  program  doesn't  recognize  the
directions any longer as verbs. Have a look at this (sorry, a bit
long) transcript:

-------------------- start: Apprentice.script -------------------
001 Start of a transcript of
002 THE APPRENTICE
003 An Interactive Transformation
004 Copyright (c) 1996 by Olav Mueller.
005 (First-time players should type "about".)
006 Release 1 / Serial number 970116 / Inform v6.10 Library 6/3 D
007 Standard interpreter 0.2
008 Interpreter 4 Version C / Library serial number 961216
009
010 >restart
011 Are you sure you want to restart? y
012
013
014
015   BINGO! YES!!! This time you definetly hit the jackpot. After all ...
016
017 Everything you ever wanted!
018   Paradise! That's the first description ...
019
020 You can see a carrots here.
021
022 >trace 5
023 [Parser tracing set to level 5.]
024
025 >n
026 [ "n" n ]
027    [NounDomain called at word 1
028    seeking definite object
029     Trying the north wall (7) at word 1
030     Matched (1)
031     Trying the south wall (8) at word 1
032     Trying the east wall (9) at word 1
033     Trying the west wall (10) at word 1
034     Trying the northeast wall (11) at word 1
035     Trying the northwest wall (12) at word 1
036     Trying the southeast wall (13) at word 1
037     Trying the southwest wall (14) at word 1
038     Trying the ceiling (15) at word 1
039     Trying the floor (16) at word 1
040     Trying the outside (17) at word 1
041     Trying the inside (18) at word 1
042    [ND made 1 matches]
043 [DSA on yourself with reason = 3 p1 = 0 p2 = 0]
044 [DSA on the carrots with reason = 3 p1 = 0 p2 = 0]
045 You wouldn't leave this place now, would you? (eat carrots first)
046 [DSA on the Everything you ever wanted! with reason = 2 p1 = 0 p2 = 0]
047 [DSA on yourself with reason = 2 p1 = 0 p2 = 0]
048 [DSA on the carrots with reason = 2 p1 = 0 p2 = 0]
049
050 >eat carrots
051 [ "eat" eat / "carrots" carrots ]
052 [Parsing for the verb 'eat' (1 lines)]
053
054 [line 0 * edible -> Eat]
055  [line 0 token 1 word 2 : edible]
056   [Object list from word 2]
057   [Calling NounDomain on location and actor]
058    [NounDomain called at word 2
059    seeking definite object
060     Trying the north wall (7) at word 2
061     Trying the south wall (8) at word 2
062     Trying the east wall (9) at word 2
063     Trying the west wall (10) at word 2
064     Trying the northeast wall (11) at word 2
065     Trying the northwest wall (12) at word 2
066     Trying the southeast wall (13) at word 2
067     Trying the southwest wall (14) at word 2
068     Trying the ceiling (15) at word 2
069     Trying the floor (16) at word 2
070     Trying the outside (17) at word 2
071     Trying the inside (18) at word 2
072     Trying yourself (24) at word 2
073     Trying the carrots (26) at word 2
074     Matched (1)
075    [ND made 1 matches]
076   [ND returned the carrots]
077   [token resulted in  success]
078  [line 0 token 2 word 3 : END]
079 [Line successfully parsed]
080 Eating carrots ...
081 [DSA on the Everything you ever wanted! with reason = 2 p1 = 0 p2 = 0]
082 [DSA on yourself with reason = 2 p1 = 0 p2 = 0]
083 [DSA on the carrots with reason = 2 p1 = 0 p2 = 0]
084
085 >n
086 [ "n" n ]
087    [NounDomain called at word 1
088    seeking definite object
089     Trying the north wall (7) at word 1
090     Matched (1)
091     Trying the south wall (8) at word 1
092     Trying the east wall (9) at word 1
093     Trying the west wall (10) at word 1
094     Trying the northeast wall (11) at word 1
095     Trying the northwest wall (12) at word 1
096     Trying the southeast wall (13) at word 1
097     Trying the southwest wall (14) at word 1
098     Trying the ceiling (15) at word 1
099     Trying the floor (16) at word 1
100     Trying the outside (17) at word 1
101     Trying the inside (18) at word 1
102    [ND made 0 matches]
103 That's not a verb I recognise.
104
105 >quit
106 [ "quit" quit ]
107 [Parsing for the verb 'quit' (1 lines)]
108
109 [line 0 * -> Quit]
110  [line 0 token 1 word 2 : END]
111 [Line successfully parsed]
112 Are you sure you want to quit? y
-------------------- end: Apprentice.script ---------------------

    Interestingly "go north" still works correctly, while "n"  or
"north"  does  not  compute  ... can anyone help? What am I doing
wrong?

CU,
Olav

-------------------------------------------------------------------
omueller@tribal.line.org  omueller@sunserver1.rz.uni-duesseldorf.de
    Fileserver: SEND HELP im Subject an omueller@tribal.line.org

    Opinion is divided on the matter,  m'lud.  I  say  it  is  --
everyone else says it ain't.
