Problem in TADS3... is the verb "pick" reserved by tads?

Okay… I have a game written in TADS3 which is nearly done, but have been vexed by a problem I can’t resolve. I have a bunch of flowers. when you pick 3 of them (each “pick” creates a random instance) they become a bouquet. so far so good… but only if I’m using the verb “take.” When I define “pick” to perform the same actions as “take” using the function dobjFor(Pick) asDobjFor(Take), the first flower picks just find, but at the second I get a stack overflow.

Now, I had originally tried the procedure for creating the verb ‘pick’, but it errored out saying I was redefining it, which I assume means tads has predefined it somewhere. But as what? whatever this action is inheriting from its original class must be causing the problem, but I can find no information on “pick” anywhere in the documentation. It isn’t the same as “pick up”, because that would make it act like “take” anyway so I wouldn’t have to do anything.

Does anyone have any clue what the mysterious “pick” action is, and how to override it? If not, I’m having a really hard time finding help forums on TADS, so if someone could shove me in the right direction I’d appreciate it. Thanks! Oh, and nice to meet you all. :slight_smile:

You might get some more help from rec.arts.int-fiction,

groups.google.com/group/rec.arts.int-fiction

Or subscribe with your newsgroup reader. There are a few experienced TADS3 users there who, as far as I know, don’t read the forum here.

Also there is a development mailing list archived at

lists.v-space.org/archive/tads3/

Now that I think about it I’ve never seen how you would subscribe to that list, I just read the archive, but I’m sure you could email Mike to find out.

That said, I’m curious what your actual code is for this function. I browsed through the TADS3 library a moment ago, in actions.t and en_us.t, and didn’t find a pick verb, as you hinted. So I suspect the runaway routine is in how you defined your function. Hope that helps.

I second George’s recommendation on going to the newsgroups for this. I’m not sure if Eric Eve and the others are members here, so I’d also suggest asking the question on RAIF first.

There’s probably no need to get into the mailing list for your question (as it’s mostly made up of more experienced users of TADS 3), but it’s up to you. :wink:

It seems it paid to take a long break from this problem before coming back to it… somehow, if this makes sense… the source of my problems was that the room had no floor. I have absoutely no idea why this would have any bearing on my verb. Its action coding was identical to that of take, as the only way it was implemented was “dobjFor(Pick) asDobjFor(Take)”

My professor back when I first began this game couldn’t find anything wrong with the code that would make the action for these two verbs vary. Anyways, I made the grass in my room into a floor, and at least half of my problem was fixed. The rest needed to be juryrigged because the pick action was unable to realize that it couldn’t pick the flower that was already in my inventory, and try as I might I can’t find the code that tells TADS to ignore inventory before running the take action.

Anyways, thanks for your suggestions, I appreciate the info on places where I might find help in the future.

That’s odd, but in a way it’s not surprising that removing the floor would produce unexpected problems. The TADS 3 library needs to know what kind of floor/ground each room has, unless the room belongs to class FloorlessRoom.

That’s odd. Did you monkey with verify() in dobjFor(Take) of your flower? If you look in thing.t, you’ll find the dobjFor(Take) handling pasted below. Your flower should inherit that handling unless you overrode it.

Thing
    dobjFor(Take)
    {
        verify()
        {
            if (isDirectlyIn(gActor))
            {
                /* I'm already holding it, so this is not logical */
                illogicalAlready(&alreadyHoldingMsg);
            }
            [...]
        }
    }
;

Greg

Yeah, but I don’t know why it wouldn’t have left the default floor in place, as it has in the past.

And nope, I didn’t change the verify at all. For whatever reason the routine checking for which flower I wanted to pick ran before the verify statement. When I did try to add a different verify statement to pick, it didn’t even make it to the verify code I added. When I tried to pick the flower in my inventory, it returned “You can’t do that.” This return isn’t what is defined by default for take, or what I had defined specifically for pick.

Anyways, thanks for the insights, progress seems to have picked up again, so hopefully I’ll be all set for my portfolio submission.