Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXIT BUGS: $v and $o #18

Closed
tajmone opened this issue Oct 6, 2020 · 0 comments
Closed

EXIT BUGS: $v and $o #18

tajmone opened this issue Oct 6, 2020 · 0 comments
Labels
⚙️ compiler ALAN compiler 💀 bug Something isn't working

Comments

@tajmone
Copy link
Contributor

tajmone commented Oct 6, 2020

Bug Description

Inside an EXIT block, the $v is printed out as #literal, instead of the typed direction.

Expected Behavior

Although directions are not technically VERBs, but EXITs, it would make sense to ensure that in their runtime context the $v is assigned the direction typed by the player — after all, from the player's point of view, there are only "typed commands", and the distinction between verbs and directions is not meaningful.

Example to Reproduce the Bug

When compiling and adventure containing the following code:

The forest IsA DARK_LOCATION at outdoor.
  Exit north, south, east, west, northeast, southeast, northwest, southwest
    to nowhere
      Check "You head $v, but you only find more trees."
  End exit.
End the forest.

it produces the following transcript:

> north
You head #literal, but you only find more trees.

Secondary Bug (related)

Even worst, using the $o — which manages to slip through the compiler's integrity checks:

The forest IsA DARK_LOCATION at outdoor.
  Exit north, south, east, west, northeast, southeast, northwest, southwest
    to nowhere
      Check "You head $o, but you only find more trees."
  End exit.
End the forest.

produces:

> north
You head

As you enter the twilight zone of Adventures, you stumble and fall to your
knees. In front of you, you can vaguely see the outlines of an Adventure that
never was.

APPLICATION ERROR: Nonexistent parameter referenced.

<If you are playing this piece of Interactive Fiction, please help the author to
debug this programming error. Send an exact transcript of the commands that led
to this error to the author. Thank you! If you *are* the author, then you have
to figure this out before releasing the game.>

Not so with $1, which produces a compiler error instead:

   25.        Check "You head $1, but you only find more trees."
=====>              1

  *1*   551 E : String contains reference to a parameter that does not exist in
                this context.

@tajmone tajmone added 💀 bug Something isn't working ⚙️ compiler ALAN compiler labels Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ compiler ALAN compiler 💀 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant