This feels like an embarrassingly basic question, but I can't find a clear answer (at least that I understand) in the I7 documentation.
I want to calculate the value of a variable from two other variables - e.g. Z = X - Y.
The first part seemed easy enough. I used:
X is a number that varies. X is initially -30.
Y is a number that varies. Y is initially 10.
Z is a number that varies.
Then I tried what to my untutored eye seemed the most intuitive way of assigning a value to Z:
Z is X minus Y.
But inform wouldn't compile. So after looking over a couple of examples in the Inform 7 Handbook I tried:
To decide which number is Z:
let Z be X minus Y;
decide on Z.
Which compiled fine, but later on when I try to use Z in a description - something like:
"On the video-screen it says: the value of Z is [Z]."
Instead of returning what I expected, which is -40, it returns 0.
Obviously I'm doing something very stupid, so would appreciate any help.
Thanks in advance