in some places if you do not type the correct password or string it exits the program. i dont want that!!!
instead if you get something wrong i want it too:
>else
>print("Sorry that is an invalid answer!")
>sleep(1)
>os.reboot()
or something of that sort that may not reboot but just let you try again either way. i put this in many places already but there are still a few areas that doom it. Heres the overall code:
term.clear()
term.setCursorPos(1, 1)
print("Welcome to bank Prototype B")
sleep(3)
term.setCursorPos(1, 1)
print("Please Type your Artifical 5 digit Pin")
local input = read("*")
if input == ("OR-197") then
end
if input == ("Potato") then
print("welcome [USER] to your bank!")
print("Would you like to:")
print("Withdraw: Type W")
print("Deposit: Type D")
sleep(1)
local input = read()
if input == "D" then
term.clear()
term.setCursorPos(1, 1)
print("Deposits")
print("What would you like to deposit?")
print("Ingots: I")
print("Tools: T")
print("Food: F")
print("Miscellaneous: M")
local input = read()
if input == "I" then
rs.setBundledOutput("back", colours.lightGrey)
print("Type S to stop")
local input = read()
if input == "S" then
os.reboot()
else
print("Sorry that is not a valid answer!")
sleep(1)
os.reboot()
end
end
if input == "T" then
rs.setBundledOutput("back", colours.pink)
print("Type S to stop.")
local input = read()
if input == "S" then
os.reboot()
else
print("Sorry that is not a valid answer!")
sleep(1)
os.reboot()
end
end
if input == "F" then
rs.setBundledOutput("back", colours.grey)
print("Type S to stop")
local input = read()
if input == "S" then
os.reboot()
else
print("Sorry that is not a valid answer!")
os.reboot()
end
end
if input == "M" then
rs.setBundledOutput("back", colours.lime)
print("To stop press S")
local input = read()
if input == "S" then
os.reboot()
else
print("Sorry that is not a valid answer")
sleep(1)
end
end
end
if input == "W" then
term.clear()
term.setCursorPos(1, 1)
print("Withdrawls")
print("What would you like to withdraw?")
print("Ingots: I")
print("Tools: T")
print("Food: F")
print("Miscellaneous: M")
sleep(1)
local input = read()
if input == "I" then
rs.setBundledOutput("back", colours.white)
print("Type S to stop ore pumping.")
local input = read()
if input == "S" then
os.reboot()
else
print("Sorry that is not a vaild answer!")
sleep(1)
os.reboot()
end
end
if input == "T" then
rs.setBundledOutput("back", colours.red)
print("To stop press S")
local input = read()
if input == "S" then
os.reboot()
else
print("Sorry that is not a valid answer!")
sleep(1)
os.reboot()
end
end
if input == "F" then
rs.setBundledOutput("back", colours.black)
print("To stop press S")
local input = read()
if input == "S" then
sleep(1)
os.reboot()
else
print("Sorry that is not a vailid answer")
os.reboot()
end
end
if input == "M" then
rs.setBundledOutput("back", colours.green)
print("To stop press S")
local input = read()
if input == "S" then
os.reboot()
else
print("Sorry that is not a vialid answer")
sleep(1)
os.reboot()
end
end
end
end
[code]
its on pastebin here:
[url="http://pastebin.com/0tzir8eF"]http://pastebin.com/0tzir8eF[/url]
Can someone help me figure this out...? Thanks.
[Edit][Note] you'll notice above when you type in your password it has the code
>if input == "OR-197" then
> end
i wanted that to end the code
as an override.