Posted 15 February 2015 - 07:04 PM
okay, i was trying to create a simple network that let's players wander through my base based on their access Level. i've hit a small snag though, i'm using the Mag Reader for verification, on the one door i have(so far) when i swipe my access card, the Server computer crashes with this message
if anybody can spot the problem i would appreciate any help you can offer :)/>
rednet : 87 : number expected
if anybody can spot the problem i would appreciate any help you can offer :)/>
path= "users/"
function newUser(username, access)
if fs.exists(path..username) then
return false
else
h = fs.open(path..username, w)
h.write("7")
h.flush()
h.close()
end
end
function getUser(username)
if fs.exists(path..username) then
h = fs.open(path..username, r)
access = h.readline()
h.close()
return access
end
end
function processRequest(id, message)
sends = getUser(message)
rednet.send(tonumber(id), sends)
end
rednet.open("back")
id,message = os.pullEvent("rednet_message")
processRequest(id, message)