instead problem

Hi. so anyway today i booted up the comp and started typing in source code, the problem is i wanted to make a cupboard a table and a gap in a wall that you could hide in to avoid detection by an armed guard, the problem is that something weird happened when i typed in some code to prevent you from picking them up, so here’s the code

[code]the gap in the wall is an object.
instead of taking the gap in the wall, say “duh”.

the description of the gap in the wall is “its a dark gap in groove in the wall, it’s kind of creepy and slimy”.

the gap in the wall is in the hallway.

The table is an object.
the table is fixed in place.
instead of taking the table, say “I dont think that this will fit in those cargo pants of yours.”.

the description of the table is “its a large coffee table compared to most.”.

the table is in the hallway.

the cupboard is an object.
the cupboard is fixed in place.
instead of taking the cupboard, say “i dont think that this will fit in those cargo pants of yours.”.

the description is “its a small cupboard, not of the safety variety”.[/code] the problem is, when i type in ‘pick up gap in wall’ it just says that its fixed in place instead of my ‘instead’ message which is, simply ‘duh’. But it works for the other ones, if anyone has a solution or can tell me what the problem is that would be great.
BTW earlier in the source i put in the code for the hallway room

The best I can offer is that the full name “gap in the wall” is confusing Inform, since it includes “in.” A couple of ways around that:
You could use “called” like this: In the hallway is a thing called a gap in the wall. or you could have the internal name just be “gap” (which might save you typing anyway?): The gap is in the hallway. The printed name of the gap is "a gap in the wall."

By the way, since you say you want the player to be able to hide in the gap, you should probably make it an “enterable container,” not just a thing or object. (And some further advice: as I understand it, you probably don’t want in-game things to be “objects.” The “thing” kind is more specific–“object” also includes rooms and compass directions and such.)

thx ill try that out, also thx for not calling me a noob or something im rlly new to this

The problem is with the instead rule: Inform reads it as

If the gap in the wall is the only gap in the game, an easy fix would be instead of taking the gap, say …
Inform understands abbreviated names (like “gap” for “gap in the wall”) even in the source text.
Indeed, it also understands “wall” in the source text as an abbreviated name for the gap in the wall.
So, what your instead rule really tells Inform is

As tove suggests, it is probably in general a good idea to be wary of giving things names that includes an “in” or an “on”.

ive already coded it in.