I’m trying to make an oven with a temperature knob that can be set, but in the check code for turning the dial I get an error message.
Here’s the code:
The oven_dial is part of the oven. Understand "dial" as the oven_dial. The oven_dial has a number called current setting. The current setting of the oven_dial is 100. The oven_dial has a number called min setting. The min setting of the oven_dial is 100. The oven_dial has a number called max setting. The max setting of the oven_dial is 500. The description of the dial is "The oven dial can be set from [min setting of the oven_dial] to [max setting of the oven_dial] degrees Fahrenheit. At the moment it's set to [current setting of the oven_dial]."
Instead of turning the oven_dial:
say "You have to specify a number to turn it to."
Setting the state of it to is an action applying to one thing and one number. Understand "turn [something] to [number]" or "set [something] to [number]" or "adjust [something] to [number]" or "put [something] at [number]" or "heat [something] to [number]" or "crank [something] to [number]" as setting the state of it to.
Check setting the state of it to:
if the noun is not the oven_dial or the noun is not the oven, say "You can't set [the noun] to a number." instead;
if the noun is the oven, now the noun is the oven_dial;
if the noun is the oven_dial:
if the number understood < min setting of the oven_dial:
instead: say "The lowest setting is [min setting of the oven_dial] degrees.";
if the number understood > max setting of the oven_dial:
instead: say "Sorry, the dial can only be set from [min setting of the oven_dial] to [max setting of the oven_dial] degrees.".
Carry out setting the state of it to:
now the current setting of the noun is the number understood;
say "You set the oven temperature to [number understood]."
The two lines that look like ‘if the number understood < min setting of the oven_dial’ generate the error message:
You wrote ‘if the number understood < min setting of the oven_dial’ : but this is a kind of value which already has a semi-numerical specification, so it can’t have an entirely verbal form as well.
How can I fix this?