Odd bug : Putting something in

Hmmm…struggling with this one. Strange behavior happens when truncating ‘put something in something’! This is the minimal code fragment I can reproduce with :

"WierdBug" by Ade
	
The Garden is a room. 	

The ring is worn by the player.

The potato is carried by the player. 

The tree is in Garden. It is a container.
	
Instead of inserting something into the tree:	
	if the noun is the ring:
		say "Yes.";
		now the ring is in the tree;
	otherwise:
		say "No.".

Results in the following behavior :


WierdBug
An Interactive Fiction by Ade
Release 1 / Serial number 210720 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Garden
You can see a tree (empty) here.

>put ring
What do you want to put the ring in?

>tree
compass (579167) 
  the north
  the northeast
  the northwest
  the south
  the southeast
  the southwest
  the east
  the west
  the up
  the down
  the inside
  the outside
(darkness object) (579199) 
(Inform Parser) (579231) 
(Inform Library) (579263) 
(property_numberspace_forcer) (579295) 
(ValuePropertyHolder_43) (579359) 
(ValuePropertyHolder_47) (579391) 
Garden (580415) 
  yourself
    a ring (being worn)
    a potato
  a tree

>

That’s wierd. But then

put ring in tree
Yes.

Where it gets EVEN wierder. If I change the code slightly so the tree is a bucket :

"WierdBug" by Ade
	
The Garden is a room. 	

The ring is worn by the player.

The potato is carried by the player. 

The bucket is in Garden. It is a container.
	
Instead of inserting something into the bucket:	
	if the noun is the ring:
		say "Yes.";
		now the ring is in the bucket;
	otherwise:
		say "No.".

Everything is suddenly fine.

WierdBug
An Interactive Fiction by Ade
Release 1 / Serial number 210720 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Garden
You can see a bucket (empty) here.

put ring
What do you want to put the ring in?

bucket
Yes.

Is this a known thing? Is it something I’m doing. Can anyone else reproduce this? Been trying to figure this out for ages!

If I turn Rules and actions on, it’s not super helpful. It just pops up with
[Rule “declare everything initially unmentioned rule” applies.] - but I have no idea why!

Thanks in advance.

Ade.

n.b. I have a workaround for this :

Does the player mean inserting the ring into the tree when the player is in Garden: it is very likely.

Sort of fixes the problem.
But I’m concerned that this is going to be a general issue and this is a bit hacky to say the least…there are many things in my WIP that could be stuck in a tree! lol

OK - so replying to my own reply.

Looks like ‘tree’ is an undocumented (?? It might be - I can’t see it - would be handy if it was listed in section 24.3 of user manual ) Inform editor special command, so this is why it pops up with the wierdness. Only happens inside inform editor.

Nothing to see here!!! lol.

2 Likes

Just for reference, it’s in 24.4. Low-level debugging commands:

“TREE creates a list of object containment. It is similar to SHOWME, but less elegant and thorough.”

But it’s admittedly easy to overlook, and I think it was quite a while until I discovered it myself. :slight_smile:

3 Likes

Ha, I ran into the exact same mystery last year! Though I did not figure it out myself.

It does feel like invoking this helpful command via a less-common word might be a helpful upgrade.

1 Like

6 posts were split to a new topic: The perils of INSTEAD