Limiting actions to specific rooms.

So, I have a thing where I have a condition that limits the ability for a player to go south at one point, and it works fine. But, once that is done, it shows up every time you go south from anywhere else and I can’t figure out how to limit the action to only a single room because I7 doesn’t recognize being in a room as a condition. Is there a way to do it, or am I just coding it wrong?

Code example. This doesn’t work, but taking out the first condition applies it to every room.

Instead of taking The Key:
if the player is not in the Training Room:
say “You can’t seem to find it anywhere.”;
do nothing;
otherwise:
continue the action.

Easiest way. Instead of going to [specific room] from [specific other room]: say "You can't do that yet."

I’m really curious about the statement that room conditions don’t work in I7, because I have a few fully functional “if the player is not in $ROOM” conditions sprinkled round the code of my last sally (e.g., “if the player is not in Foyer: / say “You walk to the foyer.”; / move the player to Foyer;”).

I’m guessing it was an indentation problem. “if…is in…” is still valid.

Though the traditional way to do that is “If the location is the foyer:”. “The player is in the Foyer” evaluates to false if the player is in/on a container/supporter, I think, which is usually not desired.

I’m not aware of being in a container of any sort, but “If the player is not in” comes back as an unrecognized condition. “If the location” does seem like a better way to do that though. I’m glad I checked back in before I started working on it this morning. You guys are super helpful.

EDIT: Totally helps when I realize that the room is called the Training Area and not the Training Room. Oops. The original line of code works when I’m not confusing the program.