hitchhiker icon indicating copy to clipboard operation
hitchhiker copied to clipboard

"EXIT" triggers a Frotz warning

Open eriktorbjorn opened this issue 5 years ago • 0 comments

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>)>>

eriktorbjorn avatar Feb 04 '20 15:02 eriktorbjorn