Posted 25 February 2012 - 11:02 PM
I am making a password program that uses rednet to connect to a main computer for the password
But it doesnt seem to be getting the password, the main computer is sending(confirmed because it is sending the var to the computer)But not the password
But it doesnt seem to be getting the password, the main computer is sending(confirmed because it is sending the var to the computer)But not the password
doneyet = 0
sender = "55"
local status, input
print("Recieving Data Via Rednet...Please wait")
while doneyet == 0 do
rednet.open("right")
action, senderID, var = os.pullEvent()
if var == var then
sleep(0.1)
action, senderID, cpass = os.pullEvent()
rednet.open("right")
doneyet = 1
end
end
print("Data received")
sleep(0.1)
print("Enter Password")
status, epass = pcall(read)
if epass == cpass then
print("Correct")
end
if not epass == cpass then
print("Incorrect Now Shutting Down")
sleep(1.5)
os.shutdown()
end
Computer sending passwords code:password ="testpass7"
var = var
x = 1
while x == 1 do
rednet.open("right")
rednet.announce(var)
sleep(0.1)
rednet.announce(password)
end
Edit: Changed line 1 of Computer sending, still doesnt work though D:Edited on 25 February 2012 - 10:52 PM