help with shopping

hi i have found code in inform7 in money for nothing, frozen assets and juggling. do i put the code from all three in or just one? I amtrying to set up buying or shopping. i will have more than one vendor but each vendor will be selling only one thing. I am trying to put the money in the wallet. but when i look in the wallet it gives the description only. when i try to buy or give money it says i have no money. i have made the wallet a player’s holdall and said “there is money in the wallet.” i have said a hundred-dollar bill is a kind of money then said “there are 8 hundered-dollar bills in the wallet.” still there is nothing in the wallet. What am i doing wrong?? :question:

Difficult to tell without seeing your code … but I note that you’ve spelled “hundred” two different ways in your message. Inform won’t be able to guess that that’s a typo. If you say:

[code]
A hundred-dollar bill is a kind of thing.

Eight hundered-dollar bills are in the wallet.[/code]

…Inform will cheerfully create a different thing called “eight hundered-dollar bills” and put it in the wallet. There will be only one object in the wallet, not eight.

That’s just one example of what might be going wrong. Probably it’s something completely different.

There are different methods for implementing money and buying in Interactive Fiction. The I7 examples take a variety of different approaches, and are therefore not necessarily compatible with one another. It sounds as though you want to simulate money by implementing individual bills and / or coins. The three examples you’re working with (“Money for Nothing,” “Frozen Assets,” and “Introduction to Juggling”) don’t do this. They merely keep track of how much a thing costs and how much the player has by storing that info as a numerically - based property. If you want to implement individual bills, use the code from “Nickel and Dimed.” (Also, as Jim pointed out, watch your spelling.) Also note that ch 9.4 of the Inform Recipe Book (the second half of the documentation that came with I7) groups all the money - related examples together to help you better compare and contrast them.