Bug with AskConnector?

I seem to have run into a bug with TADS 3.1.2 involving AskConnectors. Here’s a minimalist game where this happens:

[code]#charset “us-ascii”

#include <adv3.h>
#include <en_us.h>

versionInfo: GameID
name = ‘AskConnector bug’

gameMain: GameMainDef
initialPlayerChar = me

roomA: Room ‘Room A’
north: AskConnector
travelObjs = [door1, door2]

  • door1: Door ‘first door*doors’ ‘first door’;

  • door2: Door ‘second door*doors’ ‘second door’;

  • me: Actor;

roomB: Room ‘Room B’
south = roomA

  • door1B: Door ->door1 ‘door’ ‘door’;

roomC: Room ‘Room C’
south = roomA

  • door2C: Door ->door2 ‘door’ ‘door’;[/code]

When going north, I always get a runtime error: invalid datatypes for subtraction operator. This example is based on Eric Eve’s connectors.t for the Learning T3 guide, where this problem also happens. I studied the library code around the problem area, and it seems that the library classes never declare some of the properties they seem to be using. Any ideas?

Edit: and I was right. This fixes it:

modify BasicProd lastTokenIndex = 0 firstTokenIndex = 0 ;

Thanks for tracking this down!

If it’s not too much trouble, could you post the bug report / fix to bugdb.tads.org? That will help make sure it goes into the next release.

I’ll post it. I just wanted to be sure this was an actual bug and not something I misunderstood.