having trouble handling tads 3 money objects

I am trying to construct an ATM machine that will accept a debit card and dispense five $20 bills in return.

Using the sample.t example as my guide (examples folder of the TADS 3 installation in C:\Program Files (x86)\TADS 3), where gold coins are put into and taken out of jars, I have an ATM machine that will accept a debit card (and only a debit card) and in return a single $20 bill is added to the character’s wallet. Not quite, what I want (I would like multiple $20s added in a single ATM transaction) but close.

But my problem of the moment is that once the bill gets put into the wallet, I am unable to take it out. Here’s what happens when I start with a wallet that contains a debit card and a credit card and no money…

put debit card in atm
(first taking the debit card)
Done.

look in wallet
The wallet contains a credit card and a 20 dollar bill.

take bill
The word “bill” is not necessary in this story.

But “bill” is one of the vocabulary words in the class definition…

class TwentyDollarBill: Dollar 'paper - ’ ‘20 dollar bill’
isEquivalent = true
dollarValue = 20
dollarGroupBaseName = ‘twenty’
;

I’ve attached my source file. Any ideas on what I’m doing wrong? Thanks.

Jerry
money_supply_2.zip (1.32 KB)

Well, you are moving a class, not an object:

TwentyDollarBill.moveInto(wallet); Look at the Learning TADS 3, chapter 7.4 about dynamic creation of objects.

Tomas:

That was it.

When I add a twentyDollarBill of class TwentyDollarBill and move the object (not the class) into the wallet, it works.

twentyDollarBill: TwentyDollarBill ‘20 dollar bill’ ‘20 dollar bill’
"An engraved portrait of Andrew Jackson distributed by the U.S.
Treasury. "
;

look
Street Corner
Corner of the street.

Harry sees an atm (which contains a debit card) here. In the wallet, Harry sees a credit card and a 20 dollar bill.

take bill
Taken.

Thank you.

I also see that the section of the manual you pointed me to contains what may be the solution to getting multiple bills out of the machine. Thank you for that, as well.

Jerry