Inform Library 6/12 and Inform 6.33.1 for Unix go beta

If i comment out: “keep_silent = 0;” it’s seems to work fine.

In parserm.h, line 538 & 539 there’s ‘+’ before Array:+Array parse -> 2 + (MAX_BUFFER_WORDS * 4) + 3; +Array parse2 -> 2 + (MAX_BUFFER_WORDS * 4) + 3;

Can we move this thread to the Inform forum?

It looks like those were some droppings left over from manually copying patches over from the old CVS repo. Fixed.

Sure, but I don’t have the creds to do it.

Sorry, I hadn’t noticed it was in the wrong place.

It started off in the right place as an announcement that 6/12 had gone beta, but mutated into a bug-squashing thread.

The old forum was the Game Announcements forum - it didn’t belong there. Here or the tech developments board is appropriate.

It’s my fault. I am a beginner…

In the function ChangePlayer(obj), if obj == nothing, maybe that by default obj can be equal to selfobj?

ChangePlayer(george);
ChangePlayer(); !selfobj

In LanguageLM: Order, is not ‘actor’ but ‘noun’ (x1) who “have better things to do”?

-CSubjectHas(actor,false); " better things to do.";
+CSubjectHas(x1,false); " better things to do.";

It seems that actor is always passed to L__M(), but yeah, it looks funky.

In parserm.h the parameter is actor (I had not seen it), but in verblibm.h it’s noun !?

parserm.h:
L__M(##Order, 1, actor);

verblim.h:
[ AskForSub;
    if (noun == player) <<Inv, actor>>;
    L__M(##Order, 1, noun);
];
[ AskToSub; L__M(##Order, 1, noun); ];

Maybe LanguageLM: Order need two different messages !?

Sorry, but Miscellany:32 with not_holding does not work any more. You can remove not_holding. I shall make without it.
https://github.com/DavidGriffith/inform6lib/commit/fe077576729a7355b2e74006725a6d43910ce3aa

-if (etype == NOTHELD_PE) {  L__M(##Miscellany, 32, not_holding); oops_from=saved_oops; }
+if (etype == NOTHELD_PE) { L__M(##Miscellany, 32); oops_from=saved_oops; }

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?

What should I do with the Order action?

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

[ AskForSub;
    if (noun == player) <<Inv, actor>>;
    L__M(##Order, 1, noun);
];
[ AskToSub; L__M(##Order, 1, noun); ];

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.

>

The problem with Infix inventory is that we have this little chunk of code in infix.h:

[ InfixInvSub i;

    print (string) Story, (string) Headline;
    print "  ", (number) #highest_object_number - #lowest_object_number + 1,
        " objects;^";

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:

Verb 'wave'
    *                                           -> WaveHands
    * noun                                      -> Wave
    * noun 'at' noun                            -> Wave
    * 'at' noun                                 -> WaveHands;

Compare to this:

Verb 'drop' 'discard'
    * multiheld                                 -> Drop
    * multiexcept 'in'/'into'/'down' noun       -> Insert
    * multiexcept 'on'/'onto' noun              -> PutOn;

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.