Help with a puzzle. . .

Hi everybody! I’m finally back, this time with another question. So my problem is this:
I have an observatory with a big telescope, like the kind you would see in a movie. To get access to something (a journal), one would have to set the dial to a certain number, or combination of letters. This would open a secret drawer, allowing the player to take the formentioned item. This on it’s own is not the problem, I can just use some tweaked inform code from the recipe book to make this work. However, I decided this was too easy on its own. What I would like now is to have a lens for the telescope have to be inserted before allowing the dial to be turned, in order to add another layer to the puzzle. Here is my code so far:


The Star Gazer is in the Observatory. The secret drawer is part of the Star Gazer. The secret drawer is scenery. The secret drawer is closed and unopenable. The leather nootebook is in the secret drawer. The Dial is part of the Star Gazer. The Star Gazer is a opaque container.
Instead of inserting an object in the Star Gazer:
say “It won’t fit.”.
Instead of spinning the dial when the lens is not inside the Star Gazer:
say “The dial won’t turn.”.
After spinning the dial to 1384: now the secret drawer is open; say “Clonk! and the secret drawer swings slowly open, revealing [a list of things in the secret drawer].”
Spinning it to is an action applying to one thing and one number. Report spinning it to: say “Click! and nothing else happens.”
Understand “spin [something] to [a number]” as spinning it to.


Right now I keep getting these error messages:

Problem. You wrote ‘Instead of inserting an object in the Star Gazer’ , which seems to introduce a rule taking effect only if the action is ‘inserting an object in the Star Gazer’. But that did not make sense as a description of an action. I am unable to place this rule into any rulebook.

Problem. You wrote ‘Instead of spinning the dial when the lens is not inside the Star Gazer’ , which seems to introduce a rule taking effect only ‘when the lens is not inside the Star Gazer’. But this condition did not make sense, so I am unable to accept this rule.

If you could be able to help me with this, I would be very thankful!

Shouldn’t it be ‘Instead of inserting an object INTO the Star Gazer’?

(And ‘Instead of spinning the dial TO when the lens is not inside the Star Gazer:’’)

Felix,
I just tried this and it seemed to get rid of most of the problems, but I’m left with this:

You wrote ‘Instead of spinning the dial to when the lens is not inside the Star Gazer’ , which seems to introduce a rule taking effect only ‘when the lens is not inside the Star Gazer’. But this condition did not make sense, so I am unable to accept this rule.

Thanks for the help though!

The posted source text doesn’t create any lens. So, the compiler wouldn’t understand the condition ‘when the lens is not inside the Star Gazer’.

Thanks for the help! There were a few other slight changes I made, but it works perfectly now!