For example this requires you to add "if input == "yes" or input == "Yes" etc.
If I were to type "YEs" with this lot of code it would error
Spoiler
told = false
while not told do
print("Would you like to open the door?")
input = read()
if input == "yes" or input == "Yes" then
rs.setOutput("left", true)
sleep(3)
rs.setOutput("left", false)
told = true
elseif input == "no" or input == "No" or input == "nO" or input == "NO" then
rs.setOutput("left", false)
told = true
else
print("Did not reconise")
end
end
But I want it so I would only need to do this lot of code with 'if input == "yes" then' and it would work with any sort of capilization.
Spoiler
told = false
while not told do
print("Would you like to open the door?")
input = read()
if input == "yes" then
rs.setOutput("left", true)
sleep(3)
rs.setOutput("left", false)
told = true
elseif input == "no" then
rs.setOutput("left", false)
told = true
else
print("Did not reconise")
end
end
So I would only need to type yes/no once not over and over with all the different combinations for yes/no
Please tell me you understand me