inform 7: smashing glass

[code]The description of the glass wall is “A large wall made of glass, you dont want to say what you see on the other side.”
The description of clear glass is “A transparent materal.”

Instead of smashing the glass wall with the paperweight: say “You hit the glass wall hard with the paperweight and the window shatters leaving an open space where there once was glass.”; now the glass wall is open.; remove clear glass from play.

smashing is an action applying to one thing.
Understand “smash [something]” as smashing.

Report smashing:
say “crash!”

clear glass is part of the glass wall. the glass wall is a closed scenery door. the glass wall is east of Dim Lit room. the glass wall is west of the wall of horrors.

whats wrong with my code?

You can’t specify “with nothing”, at least not without some extra work.

You’ll need to make a new action, smashing glass, that directs to an error message. (That way is much more flexible than the “Understand X as a mistake” formulation.) Or, it’s very very likely that you want smash to be equivalent to attack, in which case you want to use an instead rule for attacking, and add “smash” as a synonym for attack.

Sounds like a clear case of “attacking it with” to me.

Something like this might work (adapted from my own WIP):

[code]Understand the commands “crack” and “break” and “smash” as something new.
Understand “break [something]” as attacking.
Understand the commands “split” and “crack” and “kick” and “smash” and “bash” and “pry” as “break”.

attacking it with is an action applying to one thing and one carried thing.
Understand “attack [something] with/using [something preferably held]” as attacking it with.
Understand “break open [something] with/using [something preferably held]” as attacking it with.
Understand “break [something] open with/using [something preferably held]” as attacking it with.

Check attacking something with something:
say “Generic denial for attacking [the noun] with [the second noun].”;
stop the action;

Check attacking the glass when the paperweight is carried:
instead try attacking the glass with the paperweight.

Instead of attacking the glass with the paperweight:

The “something new” declaration might not be necessary for you - I just did it so nonsensical commands like “kill window open with paperweight” wouldn’t match accidentally.

ilovemyhedgehog, please don’t correct the code in your post when you’ve received the answer. It makes the thread useless for people who might have the same problem later and gravel’s reply reads like gibberish now that you’ve removed everything he refers to.

Aha! I was confused about what gravel was talking about. Yes, there’s no reason to correct the code you’re asking about - it’s helpful for people to see what mistakes others have made alongside the solutions. Now if you were offering someone a solution and someone found an error in it, you might do something like this:

Instead of opening a drawer when [the drawer][edit: corrected to]the noun[/edit] is open:

ok sorry