The problem is that the “try” phrase tells Inform to try the given action itself instead of asking the player for another command. So if you’re using it you need a whole action after it, like “try going up” or “try putting the beaker on the table.” When you write “try going” Inform just thinks that you’re telling it to execute the going action without any direction specified, and it can’t do that. So you need to give the player a chance to type a direction.
Fortunately, in your case you don’t need to do anything fancy – since “up” and “down” by themselves are understood as commands, you can just kick the player back to the normal command prompt. If you want to intercept all “climb” commands this way, you can use “Understand as a mistake” from section 17.20 of the manual:
[code]The Lab is a room. “Some stairs rise to somewhere above you and also descend to a dingy darkness below.”
Down from lab is Storeroom.
Up from Lab is attic.
Stairs are scenery in lab.
Understand “climb” or “climb [stairs]” as a mistake (“Just type the direction you want to climb, ‘up’ or ‘down.’”).[/code]
And then the game will respond to these commands just by printing the message and waiting for another command. If the player then types “up” or “down” it’ll work according to the normal action-processing rules. And if they type another command instead it’ll work, which will be fine.
If you want to add conditions then I don’t think the “mistake” machinery will work (EDIT: Wrong, see below in thread) so you might want to use a before rule. (A complication is that this will invoke the every turn rules etc., whereas the “mistake” won’t.) Actually your rule should be fine if you just leave out “try going”:
Before climbing stairs:
say "Just use the direction on its own - up or down.";
Stop the action.
To take care of climb up and down you might want to redirect “climb up” and “climb down” to the going action:
[code]
Understand “climb [up]” or “climb [down]” as going.[code]
(I put “up” and “down” in parentheses so the game will understand any synonyms for them we might have.) You could actually restrict this one so that it only works with the stairs, by adding “when the stairs are visible” to the end, but it really seems like it ought to work whenever you can go up or down. Maybe if you have some other climbable things in your game you’d want to tweak it.
Putting this together I have:
[code]The Lab is a room. “Some stairs rise to somewhere above you and also descend to a dingy darkness below.”
Down from lab is Storeroom.
Up from Lab is attic.
Stairs are scenery in lab.
Before climbing stairs:
say “Just use the direction on its own - up or down.”;
Stop the action.
Understand “climb [up]” or “climb [down]” as going.[/code]
Oddly enough this interprets “climb” by itself as “climb up” but that seems OK. Well, maybe not in the attic.
BTW you might want to look into making the stairs a backdrop so they can be in the attic and the basement as well.