I’ve got a quick question for you all. The if statements in regards to numerical values is really giving me a fit. I just can’t seem to find the proper syntax in calculating numbers. Here I am attempting to have the computer read a variable Oxygen to see if it is zero and if not, subtract one. Can you tell me what i’m doing wrong?
Oxygen is a number that varies. Oxygen is 60.
Every Turn:
If the Oxygen is 0:
say "You have died";
otherwise:
Oxygen = Oxygen - 1
Got one more question and that should be it. What is wrong with this code?
Every Turn:
If oxygen equals 0:
say "Your computer begins to beep and the oxygen meter reads red. As the oxygen fades from your suit the last you see is Saturn above the horizon. ***You have Died***";
end the story;
otherwise:
decrease oxygen by 1.
The error I get is:
Problem. In the sentence ‘If oxygen equals 0 begin’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘oxygen equals 0’.