the-infocom-files / hitchhiker

The Hitchhiker’s Guide to the Galaxy
21 stars 4 forks source link

"EXIT" triggers a Frotz warning #6

Open eriktorbjorn opened 4 years ago

eriktorbjorn commented 4 years ago

I did this at the start of the game, but it probably works just about everywhere:

>EXIT
Warning: @test_attr called with object 0 (PC = ab6e) (will ignore further
occurrences)
You'll have to get out of the bed first.

This is because "EXIT" doesn't require an object, yet V-EXIT tests VEHBIT on PRSO:

<SYNTAX EXIT = V-EXIT>
<SYNTAX EXIT OBJECT = V-EXIT>
<SYNONYM EXIT DEPART WITHDR>
<ROUTINE V-EXIT ()
     <COND (<FSET? ,PRSO ,VEHBIT>
        <PERFORM ,V?DISEMBARK ,PRSO>
        <RTRUE>)
           (T
        <DO-WALK ,P?OUT>)>>

This was apparently fixed in the Solid Gold version, so maybe that's the fix we should use here as well:

<ROUTINE V-EXIT ()
         <COND (<ZERO? ,PRSO>
                <SETG PRSO <LOC ,PROTAGONIST>>)>
         <COND (<FSET? ,PRSO ,VEHBIT>
                <PERFORM ,V?DISEMBARK ,PRSO>
                <RTRUE>)
               (T
                <DO-WALK ,P?OUT>)>>