Posted 06 February 2014 - 09:27 AM
Dear Fellow Coders, I am have an issue with my computer craft…. I am running on the Tekkit Platform Minecraft 1.5.2 with craft Os 1.5 my issue is my code isnt working can someone help solve it?
-- Basic Start up Configuration--
local unlock = 1416
local edit = edit
local side = left
--User 1--
local user1 = ""
local pass1 = ""
--User 2--
local user2 = ""
local pass2 = ""
--User 3--
local user3 = ""
local pass3 = ""
--User 4--
local user4 = ""
local user5 = ""
-- Reset Up Configuration --
local setup = false --Set to false to reset system
-- DO NOT EDIT BELOW THIS LINE ---- DO NOT EDIT BELOW THIS LINE ---- DO NOT EDIT BELOW THIS LINE ---- DO NOT EDIT BELOW THIS LINE --
local t = 5
local pass = false
local v = "1.5b"
local run = false
local done = false
local userCheck = ""
local passCheck = ""
local c = ""
if setup == false then
term.clear()
term.setCursorPos(1,1)
print("Welcome To Poptarts Security Door")
term.setCursorPos(1,2)
print("Version:", v)
term.setCursorPos(1,3)
print("Lets Get Started")
sleep(5)
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 1")
term.setCursorPos(1,2)
write("Username: ")
user1 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass1 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(2)
term.clear()
term.setCursorPos(1,1)
sleep(5)
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 2")
term.setCursorPos(1,2)
write("Username: ")
user2 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass2 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(2)
term.clear()
term.setCursorPos(1,1)
sleep(5)
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 3")
term.setCursorPos(1,2)
write("Username: ")
user3 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass3 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(2)
term.clear()
term.setCursorPos(1,1)
sleep(5)
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 4")
term.setCursorPos(1,2)
write("Username: ")
user4 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass4 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(2)
term.clear()
term.setCursorPos(1,1)
sleep(5)
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 5")
term.setCursorPos(1,2)
write("Username: ")
user5 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass5 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(2)
term.clear()
term.setCursorPos(1,1)
print("Set-up Complete")
sleep(2)
term.clear()
setup = true
end
while done == false do
term.clear()
term.setCurosorPos(1,1)
print("Setup Configured Now Booting")
term.setCursorPos(1,2)
print("Version: ", v)
sleep(2)
term.clear()
while run == false do
redstone.setOutput(side, false)
write("Username: ")
userCheck = user.input()
term.clear()
if userCheck == user1 then
write("Password: ")
passCheck = user.Input()
term.clear()
if passCheck == pass1 then
print("Access Granted")
sleep(t)
redstone.setOutput(side, true)
term.clear()
end
end
if userCheck == user2 then
write("Password: ")
passCheck = user.Input()
term.clear()
if passCheck == pass2 then
print("Access Granted")
sleep(t)
redstone.setOutput(side, true)
term.clear()
end
end
if userCheck == user3 then
write("Password: ")
passCheck = user.Input()
term.clear()
if passCheck == pass3 then
print("Access Granted")
sleep(t)
redstone.setOutput(side, true)
term.clear()
end
end
if userCheck == user4 then
write("Password: ")
passCheck = user.Input()
term.clear()
if passCheck == pass4 then
print("Access Granted")
sleep(t)
redstone.setOutput(side, true)
term.clear()
end
end
if userCheck == user5 then
write("Password: ")
passCheck = user.Input()
term.clear()
if passCheck == pass5 then
print("Access Granted")
sleep(t)
redstone.setOutput(side, true)
term.clear()
end
end
if userCheck == unlock then
run = true
done = true
end
if userCheck == edit then
write("Enter the unlock password:")
usercheck = user.input()
if userCheck == unlock then
term.clear()
term.setCursorPos(1,1)
print("For user 1-5 use numbers")
term.setCursorPos(1,2)
write("Enter the ID number in which you would like to edit: ")
c = user.input()
if c == 1 then
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 1")
term.setCursorPos(1,2)
write("Username: ")
user1 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass1 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(2)
term.clear()
end
if c == 2 then
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 2")
term.setCursorPos(1,2)
write("Username: ")
user2 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass2 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(2)
term.clear()
end
if c == 3 then
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 3")
term.setCursorPos(1,2)
write("Username: ")
user3 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass3 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(t)
term.clear()
end
if c == 4 then
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 4")
term.setCursorPos(1,2)
write("Username: ")
user4 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass4 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(t)
term.clear()
end
if c == 5 then
term.clear()
term.setCursorPos(1,1)
print("Please enter the following information for User 5")
term.setCursorPos(1,2)
write("Username: ")
user5 = user.input()
term.setCursorPos(1,3)
write("Password: ")
pass5 = user.input()
term.setCursorPos(1,1)
term.clear()
print("Processing...")
sleep(t)
term.clear()
end
if c == "side" then
term.clear()
term.setCursorPos(1,1)
print("Please Enter the output side")
term.setCursorPos(1,2)
write("Side: ")
side = user.input()
term.setCursorPos(1,3)
print("Testing...")
term.clear()
term.setCursorPos(1,1)
redstone.output(side, true)
sleep(t)
redstone.output(side,false)
end
if c == "Time" then
term.clear()
term.setCursorPos(1,1)
print("Please enter the open time in Seconds")
term.setCursorPos(1,2)
write("Seconds: ")
t = user.input()
end
end
end
end
end