Error Messages with after reading a command rules

I have searched for this error and cannot find it. If it is a parser error it was not in the list and so far no matter how I try to overwrite the error it still displays. This is what I am running at the moment to produce the feedback and it works fine.

[code]After reading a command:[will need an additional switch here]
if the player’s command includes “wave to contact”:
follow the reach into rules.

Reach into rules is a rulebook.

A reach into rule:
if the derim counter of Nderimswitch is less than 3:
say “[line break]The man you seek is not here yet, look at some of the market stalls while you wait.”;
if contactball is on:
if findnderim is on:
say “[line break]The man you seek is not here, you will find him in West Shyn Market.”.[/code]

The problem is that I get an error message with it that says “He isn’t available”. The character in question is not actually in play or in scope for the first three turns of the game but since it is quite possible for the player to try and interact with this character early (he is mentioned in the intro story) I need a way to play the appropriate reponse.

[Rule for printing a parser error: follow the reach into rules.] Before printing a parser error when the player's command includes "wave to [someone]": follow the reach into rules instead.

I tried the {Rule for printing a parser error:} and it does not work. I am stuck and spinning in circles here trying to find a way to override this simple statement.

I’m not sure what your code is doing, but you could try putting the character in an actual room (like an unconnected room called “the inaccessible storehouse”) instead of offstage. Inform’s scope resolution will often fail with the error “it isn’t available” if the thing you’re trying to interact with isn’t in an actual room.

I don’t know the full context but in general it’s best to never use “After reading a command” rules unless there’s no other way to accomplish what you’re doing. (For one, now the parser doesn’t understand it if the player tries “wave to the contact”.)

I would do something like this:

Bob is a man. Understand "contact" as Bob.

Waving to is an action applying to one visible thing.  [<-- note that "visible" is important]
Understand "wave to [something]" as waving to.

After deciding the scope of the player when waving to and the turn count is less than 4:
	place Bob in scope.

Carry out waving to Bob:
	follow the reach into rules. [or just drop the custom rulebook and use normal action rules]

If an object is out of scope it doesn’t make any difference if it’s in a room or off-stage.

Converted the whole thing to this, works great.

An after reading a command rule: if the player's command includes "wave to contact": follow the reach into rules; reject the player's command.

I would also agree with Juhana that it’s probably best to do this another way. Your solution is basically string matching the player’s command rather than parsing it, and in this case it’s possible to get what you want with more typical rules, and that’ll be much more flexible and friendlier to the player.

For player commands, yes, but if you try to interact with it internally (e.g. with a hard-coded “try” statement), you’ll get that error. For example:[code]Place is a room. Bob is a person.

When play begins:
try taking Bob.[/code]…which produces “He isn’t available.” rather than “You can’t see any such thing.”

The other way to get the error is to manually place something in scope while it’s still offstage:[code]Place is a room. Bob is a person.

After deciding the scope of the player:
place Bob in scope.[/code]Now, if you type TAKE BOB, you get “He isn’t available.” rather than “You can’t see any such thing.”

My understanding is that the error basically means “I’ve gotten past all my regular checks, but the object in question is offstage, so I can’t do that.” The simplest solution is just to put the object in a room.

There is a larger piece of code at work here but essentially the player begins in a room where they are suppose to meet a contact. Since this is a major item to accomplish and there is a delay of several turns before the contact arrived I needed to give appropriate responses if the player moved out of the initial room and continued searching for the contact. All of the help here was awesome. The number one thing I can agree on here is to basically stay away from “after reading a command”, this will work but tends to block everthing that follows it such as letting the player make a choice or whatever. I rewrote the whole thing using menus, flags, instead and location checks. Works great now.

The one thing I am refining at the moment is a "go to " command that understands the player is trying to move to a specific room. Im using a common word or words from a group of rooms as the name for that region. If the player types any "go to (any room name that includes the common word) then a check is made to see if the room is known (visited) and if it is in the local region. If so the player is moved to that room.