Posted 16 November 2013 - 06:26 AM
I have a system that sends a rednet signal with ids, passwords and the action to take, and the first computer sends a rednet signal with the code
print("Please enter your ID")
idInput = read
print("Please enter you password - 4 NUMBERS ONLY")
passwordInput = read("*")
passwordInput = passwordInput/13
passwordInput = passwordInput*(1024/13)
rednet.send(serverID, "ID: " .. idInput .. " Pw: " .. passwordInput .. "checkPW")
--There is a problem but ik how to fix it
receivedID, msg = rednet.receive(60)
if receivedID == serverID then
if msg == true then
--Stuff
else
--stuff
end
else
receivedID, msg = rednet.receive(60)
end
in the part where in other pc it will receive this code:
"ID: " .. idInput .. " Pw: " .. passwordInput .. "checkPW"(It will NOT appear as idInput and passwordInput but yes a full msg)
I want to remove "ID: " and have receivedID = (thing after "ID: " and before " Pw: ") and receivedPw = (thingy after "Pw: ")