Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Inform] DIAL MY DOOR

14 views
Skip to first unread message

David A. Cornelson

unread,
Feb 6, 1999, 3:00:00 AM2/6/99
to
Irene Callaci wrote in message <36bdbb45...@news.csupomona.edu>...
>Inform 6.2 (beta), Library 6/8
>

Irene,

I had a phone in Atrox and it was messy. Did you try just extending the Call
and Phone verbs to;

Extend 'call' * 'my' noun -> CallSub;

Jarb

Irene Callaci

unread,
Feb 7, 1999, 3:00:00 AM2/7/99
to
Inform 6.2 (beta), Library 6/8

In my game, I have a telephone. So far, so good. I want the
player to be able to CALL THE COPS or DIAL 911. That all works
just dandy. It even works if the player tries to DIAL THE DOOR
(it says, "To use the telephone, try DIAL AB12345 or CALL THE
COPS or PHONE THE HOSPITAL.") Everything works great. *Except*
if the player tries to DIAL MY DOOR (using MY instead of THE,
where DOOR could be any invalid telephone number/object). That
crashes WinFrotz.

I've traced it (I think), to a line in parserm.h, in the
ScoreMatchL routine:

if (its_score < threshold)
{
#ifdef DEBUG;
if (parser_trace >= 4)
print " ", (The) match_list-->i,
" (", match_list-->i, ") in ", (the) its_owner,
" is rejected (doesn't match descriptors)^";
#endif;
match_list-->i=-1;
}

The last line (match_list-->i=-1) seems to be the problem. WinFrotz
crashes with the error:

Fatal: illegal opcode

and the last thing on the screen is:

[** Programming error: tried to read from -->64 in the array
"match_list", which has entries 0 up to 63 **]

If I have trace turned on, I can see a whole list scroll by of
things trying to be matched before it finally crashes.

So. My question is: Is ScoreMatchL() doing something it shouldn't
by trying to write to match_list-->i in this new version of Inform?
Is this something that should be reported to Graham? Or am I not
understanding something? (I certainly don't understand why "my"
should cause a problem when "the" doesn't.)

Thanks,

irene


Irene Callaci

unread,
Feb 7, 1999, 3:00:00 AM2/7/99
to
On Sun, 07 Feb 1999 16:58:43 GMT, ical...@csupomona.edu (Irene
Callaci) wrote:

>Inform 6.2 (beta), Library 6/8
>
>In my game, I have a telephone. So far, so good. I want the
>player to be able to CALL THE COPS or DIAL 911. That all works
>just dandy. It even works if the player tries to DIAL THE DOOR
>(it says, "To use the telephone, try DIAL AB12345 or CALL THE
>COPS or PHONE THE HOSPITAL.") Everything works great. *Except*
>if the player tries to DIAL MY DOOR (using MY instead of THE,
>where DOOR could be any invalid telephone number/object). That
>crashes WinFrotz.

I forgot to mention that verbs other than DIAL seem to handle
"my" without crashing, although I've noticed they don't handle
"my" in the same way they handle "the." If I have two similar
objects in the same location, then EXAMINE MY OBJECT simply
chooses one of the objects, without asking "Which do you mean..."
whereas EXAMINE THE OBJECT will ask the question. I'm stumped. :(

irene

Irene Callaci

unread,
Feb 7, 1999, 3:00:00 AM2/7/99
to
On Sun, 07 Feb 1999 17:43:12 GMT, ical...@csupomona.edu (Irene
Callaci) wrote:

>>Inform 6.2 (beta), Library 6/8
>

>I forgot to mention that verbs other than DIAL seem to handle
>"my" without crashing, although I've noticed they don't handle
>"my" in the same way they handle "the." If I have two similar
>objects in the same location, then EXAMINE MY OBJECT simply
>chooses one of the objects, without asking "Which do you mean..."
>whereas EXAMINE THE OBJECT will ask the question. I'm stumped. :(

AAAAARRRRRGGGGGHHHH!!!! No, that's not quite right, either. (It's
a long story.) Actually, if I have two similar objects (2 chairs,
for example) and they are in the same location, then EXAMINE MY
CHAIR simply says "You don't see any such thing." Huh? But if I
EXAMINE THE CHAIR, I am asked "Which do you mean..." The only
difference is that I used THE instead of MY. If only one of the
chairs is in the location, then EXAMINE MY CHAIR works like
EXAMINE THE CHAIR.

I want "my" to work exactly the same as "the" if there are two
similar objects in one location. If I say EXAMINE MY CHAIR and
there are two chairs, I want to be asked "Which do you mean..."

Does anyone know what is happening here?

irene


Irene Callaci

unread,
Feb 7, 1999, 3:00:00 AM2/7/99
to
On Sat, 6 Feb 1999 12:09:43 -0600, "David A. Cornelson"
<dcorn...@placet.com> wrote:
>
>I had a phone in Atrox and it was messy. Did you try just extending the Call
>and Phone verbs to;
>
>Extend 'call' * 'my' noun -> CallSub;
>

Yes, that sorta takes care of it, except other verbs don't need
a specific 'my' in the grammar, so I wonder why this one does.
Also, it doesn't help at all if the player tries to DIAL MY 911
(although I don't know why someone would do that), but it crashes
the interpreter too, even with a grammar of

Extend 'call' * 'my' number -> Dial;

It thinks 911 is an illegal object number. I've discovered other
problems with 'my' as well, so I think the problem runs deeper
than I first thought. If you EXAMINE MY CHAIR (for example) when
only one chair exists in the location, everything works, but if
you EXAMINE MY CHAIR when 2 or more chairs exist in the same
location, the game returns "You don't see any such thing"
instead of "Which do you mean, the swivel chair or the wing
chair?" <sigh>

Thanks for the tip. If I figure this out, I'll let you know.

irene

Rotonoto

unread,
Feb 7, 1999, 3:00:00 AM2/7/99
to

> It thinks 911 is an illegal object number.

I wanted to have "call 911" be a possibility in my game too & it wouldn't
let me put it in the grammar line, but

Object emergency telephone_topics
with name "911"

works fine. (I have no idea what's happening with "my," but I also stuck
that in the name property rather than tried to put it on the grammar line.)


Joe Mason

unread,
Feb 7, 1999, 3:00:00 AM2/7/99
to
Irene Callaci <ical...@csupomona.edu> wrote:
>
>AAAAARRRRRGGGGGHHHH!!!! No, that's not quite right, either. (It's
>a long story.) Actually, if I have two similar objects (2 chairs,
>for example) and they are in the same location, then EXAMINE MY
>CHAIR simply says "You don't see any such thing." Huh? But if I
>EXAMINE THE CHAIR, I am asked "Which do you mean..." The only
>difference is that I used THE instead of MY. If only one of the
>chairs is in the location, then EXAMINE MY CHAIR works like
>EXAMINE THE CHAIR.
>
>I want "my" to work exactly the same as "the" if there are two
>similar objects in one location. If I say EXAMINE MY CHAIR and
>there are two chairs, I want to be asked "Which do you mean..."

Sounds to me like 'my' is referring to 'the one I'm carrying'. So if
you were carrying a chair, it would default to that one, but since
you're not, there is no "my chair".

You know what I'd do? Hack English.h, find the ward 'my', and change it
to 'my.' (note the .), which is untypeable since the parser would split
the word "my." into the tokens 'my' '.'.

That way typing "EXAMINE MY CHAIR" or "DIAL MY DOOR" should just return the
Inform equivalent of "I don't know the word 'my'."

Joe
--
Congratulations, Canada, on preserving your national igloo.
-- Mike Huckabee, Governor of Arkansas

Irene Callaci

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to
On Mon, 8 Feb 1999 13:30:05 +0000, Den of Iniquity
<dms...@york.ac.uk> wrote:

>On Sun, 7 Feb 1999, Irene Callaci wrote:
>
> > Everything works great. *Except* if the player tries to DIAL MY DOOR
>
>WOW! What amazing beta-testers you must have!
>
>--
>Den
>
>(Yeah, I know, door is just an example...)

Oh, it's not in beta, yet. But I am an evil beta-tester myself,
plus I learned a LOT from Dylan O'Donnell, to whom I am forever
grateful, when he beta-tested Mother Loose for me. He is the
"best*.

irene


Irene Callaci

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to

Actually, I want to allow the player to dial any number and have
the game respond appropriately. For example, DIAL 1234567 might
return "Your only reward is the fast buzz that indicates an invalid
number, so you hang up." Or, "The telephone rings and rings but
nobody answers, so you hang up." Some of the responses echo the
number back (if it's less than 10000). I'm using inp2==1 to check
if second holds a number, since I can't possibly list all possible
combinations.

This 'my' thing is really strange, but I've got some ideas I want
to try out. I'll keep you posted.

Thanks,

irene

Den of Iniquity

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to

Irene Callaci

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to
On 7 Feb 1999 20:39:19 GMT, jcm...@uwaterloo.ca (Joe Mason) wrote:

>Irene Callaci <ical...@csupomona.edu> wrote:
>>
>>I want "my" to work exactly the same as "the" if there are two
>>similar objects in one location. If I say EXAMINE MY CHAIR and
>>there are two chairs, I want to be asked "Which do you mean..."
>
>Sounds to me like 'my' is referring to 'the one I'm carrying'. So if
>you were carrying a chair, it would default to that one, but since
>you're not, there is no "my chair".
>
>You know what I'd do? Hack English.h, find the ward 'my', and change it
>to 'my.' (note the .), which is untypeable since the parser would split
>the word "my." into the tokens 'my' '.'.
>
>That way typing "EXAMINE MY CHAIR" or "DIAL MY DOOR" should just return the
>Inform equivalent of "I don't know the word 'my'."

Thanks for the tip; I will tackle this asap. But I'm not sure if
this will solve it, since 'my' isn't defaulting to the object I'm
carrying. It doesn't default to anything at all if there are two
similar objects in the same location. It only works if there is
exactly one object, not more, in the location. But I will take a
look at English.h to see if I can figure this out.

On another note, I did solve my problem with DIAL MY DOOR. Hurray!
I've posted the solution in another message under this thread.

Thanks for everyone's help on this. I can sleep tonight, I think.

irene

Irene Callaci

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to
On Sun, 07 Feb 1999 16:58:43 GMT, ical...@csupomona.edu (Irene
Callaci) wrote:

>Inform 6.2 (beta), Library 6/8
>

>In my game, I have a telephone. So far, so good. I want the
>player to be able to CALL THE COPS or DIAL 911. That all works
>just dandy. It even works if the player tries to DIAL THE DOOR
>(it says, "To use the telephone, try DIAL AB12345 or CALL THE
>COPS or PHONE THE HOSPITAL.") Everything works great. *Except*
>if the player tries to DIAL MY DOOR (using MY instead of THE,
>where DOOR could be any invalid telephone number/object). That
>crashes WinFrotz.
>

>I've traced it (I think), to a line in parserm.h, in the
>ScoreMatchL routine:
>
> if (its_score < threshold)
> {
>#ifdef DEBUG;
> if (parser_trace >= 4)
> print " ", (The) match_list-->i,
> " (", match_list-->i, ") in ", (the) its_owner,
> " is rejected (doesn't match descriptors)^";
>#endif;
> match_list-->i=-1;
> }
>
>The last line (match_list-->i=-1) seems to be the problem. WinFrotz
>crashes with the error:
>
> Fatal: illegal opcode
>
>and the last thing on the screen is:
>
> [** Programming error: tried to read from -->64 in the array
>"match_list", which has entries 0 up to 63 **]
>
>If I have trace turned on, I can see a whole list scroll by of
>things trying to be matched before it finally crashes.
>
>So. My question is: Is ScoreMatchL() doing something it shouldn't
>by trying to write to match_list-->i in this new version of Inform?
>Is this something that should be reported to Graham? Or am I not
>understanding something? (I certainly don't understand why "my"
>should cause a problem when "the" doesn't.)
>

Solved it!

I have a scope routine that allows the player to dial any location
or any NPC in the game. Apparently, since this is a monster game
requiring extensive use of imem.h (which is wonderful, wonderful,
wonderful; thank you, L. Ross, thank you!), I was trying to loop
through way too many objects in this scope routine. It was a simple:

objectloop (i ofclass GoPlaces || i has animate)
PlaceInScope(i);

but it kept crashing the interpreter. So, I went into parserm.h
and increased the size of two arrays:

Array match_list --> 64;
Array match_scores --> 64;

When I changed both of these from 64 entries to 128, bingo!
Problem solved. I hate editing parserm.h, but it fixed the
problem (both with DIAL MY DOOR and DIAL MY 911, which
probably nobody would try, but one never knows...)

irene

0 new messages