[I7] Moving the player and an object RESOLVED

I’m relatively new to the engine, and am attempting to code an adventure as part of a school assignment. I’m creating a simple puzzle, and want the end result to be that when the player attempts a custom action with an object in their inventory, the player and the object are each moved into a separate room.
Basically, the player is on a ship with a cooler and a box hook. The player can take the box hook, but not the cooler, and there’s a custom action the player can take to move the cooler. This results in the player flying backwards off the ship, and the box hook moving to the same area at a different time as a different player character, which is defined as a separate room. (For those who are wondering, the adventure is based off of this article: nytimes.com/2014/01/05/magaz … c=rss&_r=0)
If/then statements don’t seem to work, and I want the game to return a message (but nothing else) if the player doesn’t have the box hook in their inventory.
I haven’t read all of the documentation and examples yet, so I apologize if this is discussed somewhere and I’m being an idiot. I’ve reached chapter 11.16, with some peaking into later chapters to try and figure things out.
Time is currently at a premium for me, as the deadline for at least a presentable and playable demo is by the end of the week.

It’s a good idea to post the relevant parts of your code (using the code tag) so that we can see what the problem is. It’s pretty hard for us to diagnose an issue like ‘If/then statements don’t seem to work’ otherwise.

What’s your current code, specifically te part that you’re having trouble with? If you’ve gotten to 11.16 you should have all the knowledge you need for a basic game like this, don’t worry.

Also, if you’re getting an error message, post that.

A shot in the dark, but the most common problem with if statements is that they don’t have a context. So if you have something like this:

If the player is not carrying the box hook: say "You don't have the box hook!"
…it won’t work because there’s not enough information to tell when that statement should be considered. You need to put it inside a rule, for example:

Every turn: if the player is not carrying the box hook: say "You don't have the box hook!"

(Or even better: Every turn when the player is not carrying the box hook: …)

That’s the most common problem but if it doesn’t help post the relevant code.

Yes, it was probably foolish of me to leave out the actual code.

[code]Introduction is a room. "[if unvisited]You are John Aldridge, a Montauk lobster fisherman with a reputation as a bit of a loudmouth. You are currently en route to your first set of traps. You believe that it is about now that you should begin pumping water into the ship’s tanks, so it can chill enough for the lobsters to survive when you reach them. Unfortunately, two large, full coolers on blocking the hatch that lets you access them.[end if]

    You are on deck, aboard the Anna Mary.
    It is roughly 3:30 in the morning.
    [if unvisited]A hatch covering the tanks is on the deck, but it is blocked by two large coolers. You will need to find some way to move them.[end if]


    SOUTH of here is the ship's cabin. Your crewmates, Anthony Sosinski and Mike Migliaccio, are sleeping in there. Sosinski told you to wake him up at 11:30, but you have decided to let him sleep, as you have been known to do."

[/code]

Moving is an action applying to one visible thing. Understand "move [something]" as moving. Instead of moving the cooler: If the player is carrying the box hook: Now the player is in OH NO! Now the box hook is in Looking for Aldridge. Otherwise, say "It's too heavy."
Also, item descriptions and the descriptions of the rooms:

A box hook is here. "A box hook is lying on the floor nearby. It is designed to help move heavy objects." The description of the box hook is "You can probably use this to move the coolers."

A cooler is here. "The hatch is blocked by two large coolers." The description of the cooler is "These heavy coolers are blocking the tanks." Instead of taking cooler, say "It's too heavy." Instead of opening cooler, say "Unlike most problems, this one cannot be solved by eating all of the food in it." Instead of pushing cooler, say "Too heavy. Excessive weight blocks a lot of solutions."

[code]OH NO! is a room. "You slip the box hook onto the handle of the bottom cooler, take a firm grip on it, and begin to pull it backwards…

Whereupon the handle on the cooler snaps.

You drop the box hook in surprise as you stumble backwards towards the end of the ship. It is all you can do to brace yourself for impact before you fall into the water below. You bob backwards away from the Anna Mary, your cries for help ignored by sleeping crewmates."[/code]

[code]Looking for Aldridge is a room. "[if unvisited]There isn’t much room to look on a small fishing boat. You’ll probably find some clues as to Aldridge’s mysterious disappearance here on the deck.[end if]

One of the hatches on the floor is open. You wonder if perhaps he fell in there, but the noxious stench makes you hesitate to check."[/code]
And the error message is this:
Problem. You wrote ‘Otherwise, say “It’s too heavy.”’ : but I can’t find a verb here that I know how to deal with, so I am ignoring this sentence altogether. (I notice there’s a comma here, which is sometimes used to abbreviate rules which would normally be written with a colon - for instance, ‘Before taking: say “You draw breath.”’ can be abbreviated to ‘Before taking, say…’ - but that’s only allowed for Before, Instead and After rules. I mention all this in case you meant this sentence as a rule in some rulebook, but used a comma where there should have been a colon ‘:’?

I suspect the issue is something really simple and foolish that I’ve overlooked this whole time.

I don’t know why, but you can’t use “otherwise” with a comma (even though you can use “if” that way). Remove the comma.

Another thing: I don’t know how Inform will react to the ! in a room name, but no matter what you need a semicolon after “move the player to OH NO!”.

Lines like these:

Now the player is in OH NO! Now the box hook is in Looking for Aldridge.
need to end with “;”. Every line that is not the last line of a code block must end with a “:” or a “;”.

Well, that gets a shorter error message, at least.
The relevant part of the code is now

Instead of moving the cooler: If the player is carrying the box hook: Now the player is in OH NO!; Now the box hook is in Looking for Aldridge. Otherwise say "It's too heavy."
And the engine is saying
Problem. You wrote ‘Otherwise say “It’s too heavy.”’ : but I can’t find a verb here that I know how to deal with, so I am ignoring this sentence altogether.

One last thing: a very nice little abbreviation is [first time][only]. Any text between those substitutions is only shown the first time.

EDIT: You need a semicolon after Aldridge, not a period. The period indicates the end of the rule.

Everything is fine (I also realized that there was something missing in the otherwise statement, which I added), but inform seems to be understanding “Move” as “Push” for some inane reason.

You have to remove the standard syntax for “move” first.

Understand "move" as something new.

That’s because the verb “move” is already defined to mean pushing. You could just use the pushing action, or you could add the line “Understand the command “push” as something new.” before your understand lines.

EDIT: Wow, two cross-posts in five minutes! That has to be some sort of record. I don’t actually know if there’s any difference between the syntaxes we posted, but if one doesn’t work, try the other.

In this case I’d just leave it in. The player won’t try “push the cooler” unless they mean to move the cooler.

Another thing I just noticed: moving should apply to one thing, not one visible thing. Using the adjective “visible” removes the touchability check.

Oh, now that I’ve looked at your source code, my wife was just reading our son the article about this. Cool!

One other unrelated piece of advice: Don’t describe action in the room description. If the player is in OH NO! and types “look,” they’ll get the whole description of how they fell off the boat again. Put the text in your “instead of moving the cooler” rule. (Also, wouldn’t it be fairer to the crewmates to say that Aldridge’s cries of help were “unheard” rather than “ignored” by them?)

You might also want to write something that will make your game recognize the command “move cooler with box hook,” but that can probably wait until you’ve got this part working…