Hello out there. I ran into some problems trying to create a money kind where I could change the dollar amount during play. Even putting [vTotalPrice] in a say statement causes an error. This is the code:
Ottawa is a room. vHasCustomer is a truth state that varies. vHasCustomer is false. Price is a kind of value. $10.99 specifies a price. A thing has a price. The price of a thing is usually $0.00. After examining something for sale: say "It can be yours for [the price of the noun]." Definition: a thing is free if the price of it is $0.00. Definition: a thing is for sale if it is not free. vTotalPrice is a kind of thing. The price of vTotalPrice is $0.00. Every turn when vHasCustomer is false: If a random chance of 1 in 2 succeeds begin; call taxi service; end if. To call taxi service: say "You call a taxi.[line break]"; now the price of vTotalPrice is $25.00; say "The cost of the taxi ride will be [vTotalPrice]";
The errors are as follows:
Problem. In the sentence ‘now the price of vTotalPrice is $25.00’ , it looks as if you intend ‘the price of vTotalPrice’ to be a property, but ‘a vtotalprice’ is not specific enough about who or what the owner is.
Problem. You wrote ‘say “The cost of the taxi ride will be [vTotalPrice]”’, but ‘vTotalPrice’ is used in a context where I’d expect to see a (single) specific example of a sayable value, not a description.
I tried everything I knew for several hours, Hunted for solutions here and on Google with no luck.
I need to store a dollar amount in a variable for calculations later in the game.