Posted 28 June 2014 - 11:45 PM
Hello, I invented a software password using a database on another computer but I have a slight problem, it does not function correctly, could you help me. Here is the code:
Database:
rednet.open("right")
local pass = rednet.receive()
if pass == "Pa$sw0rd" then
print("received!")
rednet.send(111, "on")
print("sended")
sleep(20)
end
os.reboot()
computer containing the password:
rednet.open("right")
print("Password?")
pass = read()
rednet.send(112, pass)
print("Acces to server…")
sleep(5)
commande = rednet.receive()
if commande == "on" then
redstone.setOutput("top", true)
end
thank you for Avence for your help. its been over a week that I try my error without finding
Database:
rednet.open("right")
local pass = rednet.receive()
if pass == "Pa$sw0rd" then
print("received!")
rednet.send(111, "on")
print("sended")
sleep(20)
end
os.reboot()
computer containing the password:
rednet.open("right")
print("Password?")
pass = read()
rednet.send(112, pass)
print("Acces to server…")
sleep(5)
commande = rednet.receive()
if commande == "on" then
redstone.setOutput("top", true)
end
thank you for Avence for your help. its been over a week that I try my error without finding