Sorry if this too obvious, but I couldn´t find an answer.
The player hide an object in a closed container (there are a lot of closed containers in the game) and I want this NPC to get the object by himself, but I don´t know how to get him to open the closed container. I tried something like this but to not avail. It says “the container” is too vague.
if the document is in a closed container:
try James opening the container;
One of the key things to remember with Inform is that it’s not very good at understanding the word “the”. To us, “the” means “the one and only thing matching this description which is relevant in this specific context”. But Inform isn’t very good at knowing what’s relevant in context and what isn’t.
So whenever you want to use “the” to pick out a specific thing, you have to make sure you give Inform enough additional information to know which specific thing you want: in this case, giving the relevant container an unambiguous name (“the obstacle”).