I don’t know. I added another message to Order:, and changed verblibm.h to call L__M(##Order, 2, noun); instead, but I can’t seem to get AskForSub or AskToSub to execute. Got any ideas?
No. I can call AskForSub() when “noun == player” but that’s all.
Take aspirin and look at this:
Constant DEBUG;
Include "parser.h";
[ ParserError error_type;
print " (";
switch (error_type) {
STUCK_PE: print"STUCK_PE";
CANTSEE_PE: print"CANTSEE_PE";
VERB_PE: print"VERB_PE";
default: print "Default ParserError";
}
print " ", error_type, ")^";
rfalse;
];
Include "verblib.h"; Include "grammar.h";
[ Initialise; location = theroom; ];
Object theroom "The Room" with description "This is just a plain room like any other.", has light;
Object -> apple "apple" with name 'apple' has edible;
Object -> george "george"
with
name 'george',
description "It's George!",
life [;
Answer: print " life Answer^";
Ask: print " life Ask^";
Order: print " life Order^";
Tell: print " life Tell^";
default: print " life default";
if (verb_word) print ": ",(address) verb_word;
new_line;
],
grammar [;
default: print " grammar default";
if (verb_word) print ": ",(address) verb_word;
new_line;
],
orders [;
NotUnderstood: print " orders NotUnderstood^";
default: print " orders default";
if (verb_word) print ": ",(address) verb_word;
new_line;
],
has animate male proper;
lib 6/11:
[code]
ask that ! ‘ask’ * ‘that’ creature topic → AskTo;
orders NotUnderstood
life Answer
There is no reply.
ask george for
What do you want to ask george for?
xyz
(CANTSEE_PE 4)
You can’t see any such thing.
[/code][code]lib 6/12:
ask that ! ‘ask’ * ‘that’ creature topic → AskTo;
!/* --------------------------------- Wrong
Whom do you want to ask?
george
What do you want to ask george for?
xyz
grammar default
orders NotUnderstood
life Answer
There is no reply.
!*/ ---------------------------------
ask george for
What do you want to ask george for?
xyz
(CANTSEE_PE 4)
You can’t see any such thing.
[/code]
lib 6/12:
>ask that
!/* --------------------------------- Wrong
Whom do you want to ask?
>xyz
Who do you mean, ?
>xyz
Who do you mean, ?
>george
grammar default
orders NotUnderstood
life Answer
There is no reply.
!*/ ---------------------------------
>[/code][code]lib 6/12:
>ask that
Whom do you want to ask?
>xyz
Who do you mean, ?
>me
(VERB_PE 12)
That's not a verb I recognise.
>
I see that there’s a problem with the response of “Who do you mean, ?”, which obviously is missing some stuff on the end. Are you saying that the response to “ASK THAT” is incorrect?
In 6/11, the reponse seems better and stop the input. And in 6/12, we have twice the same question with two different answers?:
>george
What do you want to ask george for? !1: The same question as 2
>xyz
grammar default
orders NotUnderstood
life Answer
There is no reply.
>ask george for
What do you want to ask george for? !2: The same question as 1 but the answer is different.
>xyz
(CANTSEE_PE 4)
You can't see any such thing.
>
It’s strange: AskToSub() seems never call and AskForSub() only when (noun == player)? > Ask me for me
There seems to be a problem with Infix and ;i or ;inventory:
!% -X
Include "parser.h"; Include "verblib.h"; Include "grammar.h";
[ Initialise; location = theroom; ];
Object theroom "The Room" with description "This is just a plain room like any other.", has light;
Object -> apple "apple" with name 'apple' has edible;
>;i
[** Programming error: tried to print (string) on something not a string **]
[** Programming error: tried to print (string) on something not a string **]
twenty-five objects;
non-library object-name constants:
theroom apple
[...]
There seems to be another problem with LanguageLM: Miscellany: 32: CSubjectIsnt(actor); " holding that!";
LanguageLM: Give: 1, LanguageLM: Insert: 1, LanguageLM: PutOn: 1, LanguageLM: Show: 1, LanguageLM: Wear: 2… never seem to be call. LanguageLM: Miscellany:32 is call instead.
(This applies to all verbSub in verblibm.h (except wave) with: if (noun notin actor && ImplicitTake(noun)))
Try with no_implicit_actions = true or property: before_implicit 2.
Include "parser.h";
Object LibraryMessages !lm_n lm_o lm_s
with
before [; Miscellany: print "(", lm_n, ") "; ];
Include "verblib.h";
Include "grammar";
[ Initialise;
no_implicit_actions = true;
location = theroom;
];
Object theroom "The Room"
with description "This is just a plain room like any other.",
has light;
Object -> Box "box"
with name 'box',
has container open;
Object -> Hat "hat"
with name 'hat',
has clothing;
Object -> Table "table"
with name 'table',
has supporter;
Object -> george "george"
with name 'george',
has animate proper;
Release 1 / Serial number 140829 / Inform v6.33 Library 6/12-beta1 SD
The Room
This is just a plain room like any other.
You can see a box (which is empty), a hat, a table and george here.
>give hat to george
(32) You aren't holding that!
>insert hat in box
(32) You aren't holding that!
>show hat to george
(32) You aren't holding that!
>put hat on table
(32) You aren't holding that!
>wear hat
(32) You aren't holding that!
>wave hat
But you aren't holding that.
>
Include "parser.h"; Include "verblib.h"; Include "grammar";
[ Initialise; location = room1; ];
Object room1 "the Room 1"
with
description "This is just a plain room 1 like any other.",
s_to room2,
has light;
Object room2 "The Room 2"
with
description "This is just a plain room 2 like any other.",
before [; Going: print "-- before The Room 2 --"; ],
after [; Going: print "-- after The Room 2 --"; ],
n_to room1,
has light;
Release 1 / Serial number 140829 / Inform v6.33 Library 6/12-beta1 SD
the Room 1
This is just a plain room 1 like any other.
>s
-- before The Room 2 --
The Room 2
This is just a plain room 2 like any other.
>n
-- after The Room 2 --
the Room 1
This is just a plain room 1 like any other.
>
Technically it’s allowed that a game have no Story or Headline constant, but as a practical matter, one shouldn’t do that. This happens also with the Brief, Superbrief, and Verbose commands.
I don’t think there’s much of a problem. Miscellany32 is triggered when the player tries to use a verb which requires a held noun and the noun isn’t held. WAVE doesn’t work like that because of this code:
I think the same sort of thing is at work with AskForSub() and AskToSub() – The only reason for those functions to execute is to complain about being improperly used, but that’s already taken care of.