Another snag in "Heidi" !?

Hello again! I am sorry to be so needy! :blush: (LOL) I promise I will try and help you guys out when I figure out TADS 3 enough to understand what’s going on! :smiley:

I have run into yet another snag while trying to work my way through the “Heidi” game in the “Getting Started in TADS 3” guide. Here’s the scoop: I am to the part of the game where I am having a conversation with the charcoal burner (Joe Black) and I am trying to make it so Heidi can ask him about the ring as soon as he mentions it in their dialog. I am using the macro “gSetKnown(ring)” to accomlish this, as per Eric Eve. Here is the code in which this macro appears:

++ SpecialTopic ‘ask why’ [‘ask’,‘why’]
“Why will your name be mud? you want to know.<.p>
He shakes his head, lets out an enormous sigh, and replies,
I was going to give her the ring tonight – her engagement ring –
only I’ve gone and lost it. Cost me two months’ wages it did. And
now she’ll never speak to me again, he concludes, with another
mournful shake of the head, never.<<gSetKnown(ring)>>”
;

In the guide, Eric says “Now, once Joe has mentioned the ring, Heidi will be able to ask about it and get a sensible response (see below), even is she hasn’t found the ring yet. If you recompile and play the game with these changes, you should find it all works properly.” :confused: However, it is not working properly for me. Even after the burner mentions the ring I still get the “DefaultAskTellTopic” (Code):

;
++ DefaultAskTellTopic
“What do you think about <>? you ask.<.p>
Ah, yes indeed, <>, he nods sagely,
<<rand(‘Quite so’, ‘You never know’, ‘Or there again, no
indeed’)>>.”
;

Instead of the response I should be getting, (Code):

++ AskTellTopic, StopEventList @ring
[
‘What happened to the ring – how did you manage to lose it? you
ask.<.p>
You wouldn’t believe it. he shakes his head again, I took it
out to take a look at it a couple of hours back, and then dropped the
thing. Before I could pick it up again, blow me if a thieving little
magpie didn’t flutter down and fly off with it!’,
‘Where do you think the ring could have gone? you wonder.<.p>
I suppose it’s fetched up in some nest somewhere, he sighs,
Goodness knows how I’ll ever get it back again!’,
'Would you like me to try to find your ring for you? you
volunteer earnestly.<.p>
Yes, sure, that would be wonderful. he agrees, without sounding
in the least convinced that you’ll be able to. ’
]

Does anyone know why this might be happening? The game compiles and runs, I cannot find any typos in my code anywhere, I’ve been over it and over it. I’ve tried retyping it several times in different ways, I tried using the full code “gPlayerChar.setKnowsAbout(ring)” instead of the macro, I’ve tried moving the property outside of the double quotes “”… all to no avail.
Any help would be greatly appreciated!
If you have any questions for me, I should be online all day, and I’ll check the forum regularly.
Thank you in advance!

:smiley:
Hi all!
I am glad to say that I have solved my own problem with the “Heidi” game!

The problem is that the code in the “Getting Started in TADS 3” Guide is missing several <.convstay> commands and the “Burner” character was leaving the conversation node containing the “gSetKnown(ring)” too early. It was, essentially, never receiving the message that Heidi knew about the ring. In order to solve the problem, I had to add the <.convstay> command to the following lines of code:

(added code in bold)

++ SpecialTopic ‘ask why’ [‘ask’, ‘him’, ‘why’]
“Why will your name be mud? you want to know.<.p>
He shakes his head, lets out an enormous sigh, and replies, I was going to give her the ring tonight – her engagement ring – only I’ve gone and lost it. Cost me two month’s wages it did. And now she’ll never speak to me again, he concludes, with another mournful shake of the head,never<<gSetKnown(ring)>><.convstay>
;
++ DefaultAskTellTopic
“And why does… you begin.<.p>
Mud. he repeats with a dispairing sigh. <.convstay>
;
++AskTellTopic, StopEventList @ring
[
‘What happened to the ring – how did you manage to lose it? you ask.<.p>
You wouldn’t beleive it. he shakes his head again, I took it out to take a look at it a couple of hours back, and then dropped the thing. Before I could pick it up again, blow me if a thieving little magpie didn’t flutter down and fly off with it!<.convstay>’,
‘Where do you think the ring could have gone? you wonder.<.p>
I suppose it’s fetched up in some nest somewhere, he sighs,
Goodness knows how I’ll ever get it back again!<.convstay>’,
‘Would you like me to try to find your ring for you? you volunteer earnestly.<.p>
Yes, sure, that would be wonderful. he agrees, without sounding in the least convinced that you’ll be able to.’
]


I hope this helps anyone else who is trying to work their way through Heidi.

Oh, and does anyone know Eric Eve’s email address? The only one I could find came back as undeliverable. I was trying to let him know about these little bugs.

Thank you!

EDITED - 4/26/07-
Took out last “<.convstay>” command (in the stop event list about the ring) as it caused the player to become trapped in the conversation node about the ring.
-A.

I PMed you.

If I recall correctly, the <<>> syntax can only be used with function calls that take no arguments. So <<gSetKnown(ring)>> won’t work. You can easily create your own method (even within the same topic object), call it from within the quotation, and use it to call gSetKnown(ring).

Hope this helps.

–JA