Adam again,
and now that ii know a bit of lua, i tried to make somthing that has never became open source (I think..)
A password server.
now, the client can send but hangs/Goes back to the beginning every time I try to recive the packet.
Here are the two GUI's
Client
while true do
rednet.open("bottom")
print("Password")
input = read()
rednet.send(6,input)
local senderId, message, distance = rednet.receive()
if senderId == "6" then
if message == "true" then
rs.setOutput("right", true)
sleep(3)
rs.setOutput("right", false)
end
if message == "false" then
print("wrong!")
end
end
end
And the server Gui
rednet.open("top")
while true do
local senderId, messsage, distance = rednet.receive()
if message == "12345" then
print("true")
rednet.send(7,"true")
else
rednet.send(senderId,"false")
end
senderId, message = nil
senderId, message = rednet.receive()
end
Please try them out, and tell me my flaw!
thanks,
Adam hendi.