Posted 15 February 2013 - 07:58 AM
i'm making an underground base and since i'fe done nothing with coding so far i wanted to make it with redpower2 and computercraft. but my coding is aparently not the best. no mather what i enter i get back the line: the pod is on its way down.
even when i am typing the n. what am i doing wrong?
code is below pls help me.
even when i am typing the n. what am i doing wrong?
code is below pls help me.
term.clear()
term.setCursorPos(1, 1)
local input
print("do you want to call the pod?")
print()
print("y/n")
print()
input = read()
-- answer to the question: do you want to call the pod
if input == "y" or "Y" then
print("the pod is on it's way down")
elseif input == "n" or "N" then
print("do you want to send the pod up?")
print()
print("y/n")
print()
input = read()
if input == "y" or "Y" then
print("the pod is on its way up")
elseif input == "n"or"N" then
print("okay the pod will stay where it is")
else
print("that is not a valid input, please try again")
end
else
print("that is not a valid input please try again")
end
Edited by