Posted 05 April 2014 - 12:30 AM
local password1=4449
term.clear()
sleep(0.1)
term.setCursorPos(1,1)
term.clear()
term.setTextColor(colors.green)
print("Hello")
print("Acount id")
sleep(1)
term.setTextColor(colors.white)
term.setCursorPos(1,3)
local inputid = read() -- variables are stated infront of prevent "awkrad behavior"
if inputid == 1 then
local input = read("*")
print("pin: ")
if input == password1 then
print("correct pin!")
else print("incorrect pin")
sleep(1)
os.reboot()
end
end
Hey so I was trying to make a bank program I know what I am going to do for the actual currency and stuff but its a problem with the pin and account id that confuses me. Whenever I run the ATM style id and pin it just ask's me for my account id(1) so I type 1 and then it goes back to the termianal like the end of a program without asking me for my pin.Edited on 04 April 2014 - 10:32 PM