inform 7: why wont my gun action work

Whats wrong with my shooting action?

Check shooting something with something:
if the player is not carrying the Henry Rifle Gun, say “you are unarmed!”
instead;
if the second noun is not the Henry Rifle Gun, say “[the second noun] does not fire.” instead;
if the noun is the Henry Rifle Gun, say " You cant do that." instead;
if the noun is the player, say “you cant die yet.” instead.

Understand " shoot[gun] at [something ungunlike]" as shooting it with (with nouns reversed).
Definition: a thing is ungunlike if it is not the gun.
Understand “shoot [something ungunlike] with [gun]” as shooting it with.
Understand “shoot [something ungunlike] with [somthing]” as shooting it with.
Understand “shoot [something] with [something]” as shooting it with (with nouns reversed).
Understand “fire [gun] at [something ungunlike]” as shooting it with (with nouns reversed).
Understand “fire at [something ungunlike] with [gun]” as shooting it with.
Understand “fire at [something] with [something]” as shooting it with.

Carry out shooting something with something:
say “bang![the noun] clutches its heart and falls down dead. [if something is part of the noun][the list of things which are part of the noun] fall to the ground! [end if][paragraph break]”;

now every thing which is part of the noun is in the location;
remove the noun from play.

It’s spelled “something”, not “somthing”. The second line of the check rule is missing a semicolon. The first understand line is missing spaces around tokens. The definition is misspelled: it is, not its. The last understand line is missing a closing bracket after the second token. “Paragraph break” is misspelled in the carry out rule. There’s an extra line inside the the carry out rule.

There might be more, but these are the ones I spotted at the first glance.

Sadly instead of copying the writing from my game, i wrote it all out here. So actually these errors were not in my game they were just my post. my shooting action still doesnt work.

Ah … well, rewriting it to post it is a bad idea, as you can see. If you’ll copy the code into your next post, possibly someone will be able to help.

A second point: “Doesn’t work” is extremely vague. I can think of half a dozen problems that would be covered by that description. If you can be specific about what goes wrong, it’s far more likely that someone will be able to make a useful suggestions.

Did you define the action (“Shooting it with is an action applying to two things.”)?

Robert Rothman

For all the understand lines its says understand as should be followed by a meaning.

Check shooting something with something:
if the player is not carrying the Henry Rifle Gun, say “You are pathetically unarmed!” instead;
if the second noun is not the Henry Rifle Gun, say “[The second noun] does not fire.” instead;
if the noun is the Henry Rifle Gun, say “Nice trick if you can do it!” instead;
if the noun is the player, say “That would be disastrous!” instead.

Understand “shoot [gun] at [something ungunlike]” as shooting it with (with nouns reversed).

Definition: a thing is ungunlike if it is not the gun.

Understand “shoot [something ungunlike] with [gun]” as shooting it with. Understand “shoot [something] with [something]” as shooting it with.

Understand “shoot [something] at [something]” as shooting it with (with nouns reversed). Understand “fire [gun] at [something ungunlike]” as shooting it with (with nouns reversed). Understand “fire at [something ungunlike] with [gun]” as shooting it with. Understand “fire at [something] with [something]” as shooting it with.

Carry out shooting something with something:
say “Bang! [The noun] Clutches its heart and falls down dead! [if something is part of the noun][The list of things which are part of the noun] clatter to the ground! [end if][paragraph break]”;
now every thing which is part of the noun is in the location;
remove the noun from play.

i dont know waht that means

The understand lines just tell the machine that particular commands typed by the player should invoke the “shooting it with” action. The check and carryout rules tell the machine what to do when that action is invoked. But it doesn’t know what to do unless you also create an action called “shooting it with” and tell the machine that that action takes two nouns.

Robert Rothman

how would i do that?

I think (I may be remembering the precise syntax incorrectly, but I’m pretty sure its in the example that was cited earlier) that what you need is an additional line:

Shooting it with is an action applying to two things.

Robert Rothman

now the check linesare not working

ok i fixed it, i t works now.

When you copy and paste code to the forums, it is a good idea to enclose it in the code tags. That way folks don’t have to recreate your tabs.

This works for me. I highly recommend Plurity by Emily Short, as it will allow for lines like:
say “[The noun] clutches [his-her] heart and falls to the ground.”

[code]The Bar is a room. There is a vase in the Bar. Bob is a man in the Bar.

Shooting it with is an action applying to two things.
Understand “shoot [something ungunlike] with [gun]” as shooting it with.
Understand “shoot [gun] at [something ungunlike]” as shooting it with (with nouns reversed).
Understand “fire [gun] at [something ungunlike]” as shooting it with (with nouns reversed).
Understand “fire at [something ungunlike] with [gun]” as shooting it with.
Understand “shoot [something] with [something]” as shooting it with.
Understand “shoot [something] at [something]” as shooting it with (with nouns reversed). Understand “fire at [something] with [something]” as shooting it with.

A gun is a kind of thing. Understand “gun” as a gun.
The Henry Rifle Gun is a gun in the Bar.

Check shooting something with something when the player is unarmed (this is the must be armed to shoot rule):
if the Henry Rifle Gun is in the location:
say “(first taking the Henry rifle)[command clarification break]”;
try taking the Henry Rifle Gun;
if the player is not carrying the Henry Rifle Gun, say “You are pathetically unarmed!” instead;

Check shooting something with something (this is the general shooting rule):
if the second noun is not the Henry Rifle Gun, say “[The second noun] does not fire.” instead;
if the noun is the Henry Rifle Gun, say “Nice trick if you can do it!” instead;
if the noun is the player, say “That would be disastrous!” instead.

Check shooting something with something (this is the only shoot people rule):
if the noun is not a person, say “If you shot [the noun], you’d have to pay for it.” instead;

Definition: a person is unarmed if it is not holding a gun.

Definition: a thing is ungunlike if it is not a gun.

Carry out shooting something with something:
say “Bang! [The noun] Clutches its heart and falls down dead! [if something is part of the noun][The list of things which are part of the noun] clatter to the ground! [end if][paragraph break]”;
now every thing which is part of the noun is in the location;
remove the noun from play.[/code]