[TADS 3] run-time error with AskConnector

I’ve had this code in my game for a long time. It’s supposed to ask the player which path she wants to take if she only types TAKE PATH. (I think the reason I did it this way was to avoid disambiguation for things like X PATH, when it’s really only one path. I forget why I didn’t just use a CollectiveGroup.) I know the code used to work, because I have beta transcripts which show it running just fine. But now, suddenly, it’s giving me a run-time error - “invalid datatypes for subtraction operator”. I have no idea what’s changed, and I can’t figure out where it’s going wrong. Help, please?

[code]frontGarden: OutdoorRoom
‘Front Garden’
“The front garden is almost as quiet as the back yard. Occasional cars pass
by, but most of the time the road is empty. It’s a much more formal garden
than the back, though. Flower beds edge the
lawn — the plants are mostly far too small to hide anyone, but some of
the shrubs might. A stone bird bath squats in the middle of the lawn, and a
path curves northeast around the house to the vegetable garden. The cars in
the driveway could be a good hiding place too. <<gActor.isIn(self) ? 'If not,
there’s the big tree to the northwest. ’ : ‘’>>”

/* connections */
northeast = vegeGarden

/* vocabulary */
vocabWords = 'front yard/garden'

;

  • gardenPathSW: PathPassage
    -> gardenPathNE
    ‘narrow little brick path’
    ‘path’
    "A little brick path runs northeast around the corner of the
    house. It looks new — the bricks all lie flat and there are
    no weeds growing up between them. "
    ;

vegeGarden: OutdoorRoom
‘Vegetable Garden’
"<<gActor.isIn(self) ? 'A path runs along the side of the house from
the front garden southwest to the cubby house at the north. ’ : ‘’>>
Between the path and the fence, vegetable plants of various kinds
stand in tidy rows. None of them are big enough to hide anyone,
though. "

/* connections */
north = cubbyArea
southwest = frontGarden

/* vocabulary */
vocabWords = 'vege vegetable garden'

;

  • gardenPathAmbig: PathPassage, AskConnector
    ‘narrow little brick path’
    ‘path’
    "The path curves round here, leaving the front garden to the
    southwest and heading north towards the cubby house. It looks new —
    the bricks all lie flat and there are no weeds growing up between them. "

    /* ask about the other two ends of the path */
    travelAction = EnterAction
    travelObjs = [gardenPathS, gardenPathNE]

    askDisambig(targetActor, promptTxt, curMatchList,
    fullMatchList, requiredNum, askingAgain, dist)
    {
    "The path leads in two directions from here. Which way do
    you want to go, north to the cubby house or southwest to
    the front garden? ";
    }

    /*

    • more likely than the other two paths, if the player doesn’t mention
    • a specific path
      */
      vocabLikelihood = 50
      ;
  • gardenPathS: PathPassage
    ‘narrow little brick north n path to (cubby) (house) (the)
    n/north/path’
    ‘path to the cubby house’
    desc = delegated gardenPathAmbig();
    ;

  • gardenPathNE: PathPassage
    ‘narrow little brick south-west southwest sw path to (the) (front)
    (garden) (yard) south-west/southwest/sw/path’
    ‘path to the front garden’
    desc = delegated gardenPathAmbig();
    ;

cubbyArea: OutdoorRoom
‘By the Cubby House’
‘the area with the cubby house’
‘area with the cubby house’
"This is a really cool cubby house. It’s big and has a ladder on one side
and a slide on the other side that goes down into a sandpit. Behind it
there’s a bush that would make a good hiding spot.<.p>
The lawn stretches off to the southwest and a little path leads south to the
vegetable garden. Or you could look behind the shed to the northwest. "

/* connections */
south = gardenPathN

actorInName = 'near the cubby house'

;

  • gardenPathN: PathPassage
    -> gardenPathS
    ‘little narrow brick path’
    ‘path’
    "A narrow brick path runs south towards the vegetable garden. It looks
    new — all the bricks lie flat and there are not weeds growing between
    them. "
    ;
    [/code]
    To produce the error in question, type TAKE PATH while in the vegetable garden.

I haven’t studied your code closely, but the problem with AskConnectors causing run-time errors rang a bell. Could your problem be related to the bug reported at http://bugdb.tads.org/view.php?id=169 and reported there as fixed for the next TADS 3 release?

Yes, that’s it! Thank you so much!

(I used to follow the TADS 3 bug reports religiously, but I’ve let it slip lately, along with all my other RSS feeds. I really need to start paying attention again…)