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

[TADS 3] Some coin classes act differently, can't tell why!

6 views
Skip to first unread message

Janny

unread,
Apr 30, 2008, 8:13:45 AM4/30/08
to
Hi.

Some of my coin classes don't behave and I can't figure out what's
different about those that do.

Example:

You see fifteen coins (three marks, three dollars, three pennies, three
crowns, and three
zorkmids) here.

]get coin
Which coin do you mean, a crown, a dollar, a zorkmid, a penny, or a mark?

]penny
Taken.

That's what I wanted. BUT:

]get coin
Which coin do you mean, a crown, a dollar, a zorkmid, a penny, or a mark?

]dollar
dollar: Taken.
dollar: Taken.
dollar: Taken.

The zorkmids behave like the dollars, too.

The code is a crude dumbing-down of the coins from sample.t:

class Coin: Thing
vocabWords = 'coin*coins'
listWith = [coinGroup]
collectiveGroup = coinCollective
;
coinGroup: ListGroupParen
showGroupCountName(lst)
{
"<<spellIntBelowExt(lst.length(), 100, 0, DigitFormatGroupSep)>>
coins";
}
compareGroupItems(a, b) { return b.coinValue - a.coinValue; }
;
coinCollective: ItemizingCollectiveGroup '*coins' 'coins'
;
class Penny: Coin 'penny*pennies' 'penny'
isEquivalent = true
coinValue = 9
;
class Mark: Coin 'mark*marks' 'mark'
isEquivalent = true
coinValue = 40
;
class Crown: Coin 'crown*crowns' 'crown'
isEquivalent = true
coinValue = 5
;
class Dollar: Coin 'dollar*dollars' 'dollar'
isEquivalent = true
coinValue = 10
;
class Zorkmid: Coin 'zorkmid*zorkmids' 'zorkmid'
isEquivalent = true
coinValue = 1
;

I'm confused, to say the least...


Khelwood

unread,
Apr 30, 2008, 8:57:11 AM4/30/08
to

Normal word truncation length is 6. That's probably why the coins with
longer names are behaving differently. There was a bug in some earlier
versions of TADS 3 (I believe 3.0.10 to 3.0.12 had this issue) that
resulted in nouns being parsed plurally when they were as long as the
truncation length. http://www.tads.org/t3doc/lib/adv3/changes.htm#3013
. What release of TADS 3 are you using?

Janny

unread,
Apr 30, 2008, 9:06:20 AM4/30/08
to
Khelwood wrote:

> Normal word truncation length is 6. That's probably why the coins with
> longer names are behaving differently. There was a bug in some earlier
> versions of TADS 3 (I believe 3.0.10 to 3.0.12 had this issue) that
> resulted in nouns being parsed plurally when they were as long as the
> truncation length. http://www.tads.org/t3doc/lib/adv3/changes.htm#3013
> . What release of TADS 3 are you using?

3.0.16!

My farthings weren't working either. Five letters or less, and it's
fine...

Khelwood

unread,
Apr 30, 2008, 9:13:17 AM4/30/08
to
> truncation length.http://www.tads.org/t3doc/lib/adv3/changes.htm#3013

> . What release of TADS 3 are you using?

OK, I've just tried it in 3.0.16. It seems to be a surviving bug.
It is related to truncation length, so until someone works out a
proper fix, you can get around it by extending or disabling the
truncation length: put
parserTruncationLength = some number bigger than 6
or parserTruncationLength = nil
in your gameMain.

Khelwood

unread,
Apr 30, 2008, 9:14:58 AM4/30/08
to

Oops. It's parserTruncLength, not parserTruncationLength. Sorry.

Janny

unread,
Apr 30, 2008, 9:18:56 AM4/30/08
to
Khelwood wrote:

Thanks for the help!

0 new messages