MantisBT - Core Inform
View Issue Details
0002028Core InformUnderstandingpublic2017-09-08 05:582017-11-03 18:38
mattweiner 
 
normalmildhave not tried
newopen 
MacintoshEl Capitan10.11.6
6M62 
 
(serious/mild) Game compiles but misbehaves
0002028: Topic understood malfunctions in "PERSON, TOPIC" command when there is an Understand "[number]" as statement
When there is a grammar line of the form

Understand "[number]" as (an action)

then in an answering action invoked by a command of the form

"BUDDY, HELLO"

will have an erroneous topic understood, leading to an error when the game attempts to print the topic understood.

Answering it that actions invoked by commands of the form

"ANSWER HELLO TO BUDDY"

behave properly.
The Vault is a room. The guard is a man in the Vault.

Calculating is an action applying to one number. Understand "[number]" as calculating.

Instead of answering someone that something: say "[The noun] doesn't seem to understand '[the topic understood].'"

test me with "answer sesame to guard/guard, sesame/actions/answer sesame to guard/guard, sesame".
Output:

Vault
You can see a guard here.

>test me
(Testing.)

>[1] answer sesame to guard
The guard doesn't seem to understand "sesame."

>[2] guard, sesame
The guard doesn't seem to understand "
*** Run-time problem P39: Attempt to say a snippet value which is currently invalid: words 0 to 3.

."

>[3] actions
Actions listing on.

>[4] answer sesame to guard
[answering the guard that "sesame"]
The guard doesn't seem to understand "sesame."
[answering the guard that "sesame" - failed]

>[5] guard, sesame
[answering the guard that "
[** Programming error: tried to read from -->-1 in the array "parse", which has entries 0 up to 60 **]
 guard , sesame"]
The guard doesn't seem to understand "
*** Run-time problem P39: Attempt to say a snippet value which is currently invalid: words 0 to 3.

."
[answering the guard that "
[** Programming error: tried to read from -->-1 in the array "parse", which has entries 0 up to 60 **]
 guard , sesame" - failed]

>

Forum thread: http://www.intfiction.org/forum/styles/subsilver2/imageset/icon_post_target.gif [^]
No tags attached.
Issue History
2017-09-08 05:58mattweinerNew Issue
2017-09-08 12:23DraconisNote Added: 0004720
2017-09-08 13:40mattweinerNote Added: 0004721
2017-11-03 18:38mattweinerNote Added: 0004748

Notes
(0004720)
Draconis   
2017-09-08 12:23   
Seems related to http://inform7.com/mantis/view.php?id=1828 [^] (which shows the same effect with [any thing] instead of [number]). Something very odd is going on in the 6M62 parser.
(0004721)
mattweiner   
2017-09-08 13:40   
It also happens with a plain old [something] token, like this:

The Vault is a room. The guard is a man in the Vault.

Understand "[something]" as examining.

Instead of answering someone that something: say "[The noun] doesn't seem to understand '[the topic understood].'"
(0004748)
mattweiner   
2017-11-03 18:38   
I just realized that I messed up the link to the forum thread. It is:
https://www.intfiction.org/forum/viewtopic.php?p=124117#p124117 [^]