I need help...

I was trying to make a complicated horror project and immedietly encountered a problem;
I put in Top Floor of Mansion is a room. There is a button 1 here. There is a button 2 here. There is a button 3 here.
and thought it would work. It did, but this is what it says when i test it:[code]Top Floor of Mansion

push button
You can’t see any such thing.
[/code]

For some reason, the buttons are created off-stage, despite the “here” assertions. Easiest fix is to be more specific.

[code]Top Floor of the Mansion is a room.

button one, button two and button three are in the Top Floor of the Mansion.[/code]

Were I you, I’d make buttons a specific kind. That would allow you much better control than merely creating them as regular things.

Numbers can also get tricky in object names, IIRC. Could there be a red button, a blue button, and a green button, or something?

The syntax for that is “Button 1 is here.” The original code creates off-stage objects called “button 1 here,” “button 2 here,” and “button 3 here” – “here” is parsed as part of the object name. I usually find it less confusing to write out the name of the room anyway (as you did).

[code]Top Floor of Mansion is a room.

The green button, The yellow button and the red button are in the Top Floor of the Mansion.[/code]
I put that in and it still says:

[code]Top Floor of Mansion

examine button
You can’t see any such thing.

examine green button
You can’t see any such thing.
[/code]

“Top Floor of Mansion” and “Top Floor of the Mansion” are considered two different things. (“the” doesn’t usually make a difference, but only when it’s at the start of a name.) You’re creating an off-stage container called “top floor of the mansion” where the buttons are.

If you open the World tab in the index, you can see the rooms and things created in the game world. You can check for duplicates and misspellings there.

Darn my correct grammer.

now to make an action involving the buttons…

Danget one of my three seconds after a problem, problem. I put:

Instead of pressing red button, say "A giant mutant ant eats you." End the game in failure.

It didn’t work so i tried:

[code]Instead of pressing red button, say “A giant mutant ant eats you.”

End the game in failure.[/code]

1st and 2nd error message:

You wrote 'End the game in failure' : but I can't find a verb here that I know how to deal with, so I am ignoring this sentence altogether.

This is a bit counter-intuitive, but it works like this: some rulebooks (Before, Instead and After) allow a comma between the preamble and the body of the rule, but only if the rule consists of one statement. In other cases you use the semicolon to separate the statements, like so:

Instead of pressing the red button: say "A giant mutant ant eats you."; end the game in failure.

Generally, rulebooks are written on that form, i.e. either

[preamble]: [single statement].

or

[preamble]: [statement one]; [statement two]; [..]; [statement n].

That’s not my problem. My problem is that its not recognizing “end the game in failure”

never mind i figured it out.

Yes, because you wrote

Instead of pressing red button, say "A giant mutant ant eats you." End the game in failure.

These are two instructions, yet between the preamble and the rules body you have a comma, so Inform thinks the rules body consists of one statement (and say “A giant mutant ant eats you.” End the game in failure. makes two statements). Furthermore, you do not separate these two statements with a semi-colon, therefore only the first statement is parsed as part of the Instead rule, and the second is read by Inform as being outside that rule.

Besides what Eleas said, “End the game in failure” isn’t recognized, I don’t think. You probably want “End the game in death.” This phrasing is now deprecated (meaning it still works but it probably won’t in future builds); see section 9.4 which explains your options. If you want a new-fangled way of ending the game in death, it’s

end the story saying "You have died"

or whatever other text you want there.

thank you Matt.

danget now its not recognizing pressing the red button and when i start it it doesnt carry out the rule. Any suggestions?

I totally forgot about it being deprecated. Given that and me looking at “button 1 is here” without seeing the problem, I’ve overlooked things twice in this thread, gah. Time for me to finally get my arse in gear and write an IF, or I’ll keep making sloppy mistakes. :blush:

is really confused

Have you defined the “pressing” action? Otherwise, I think the “pushing” action could do the trick.

[code]Home is a room. The red button is fixed in place in Home.

Instead of pushing the red button:
say “A giant mutant ant eats you.”;
end the game saying “You die horribly.”[/code]

Thank you! it finally worked! Now i’m gonna make a shortcut menu to make pushing and pressing the same thing.

is there a way to remove the undo option?