startup:30: attempt to index ? (a nil value)
--Variables reader = peripheral.wrap("right") version = "1.0" password = "five5" --Functions clear = function() term.clear() term.setCursorPos(1,1) end menu = function() clear() print("[1] Create Key") sEvent, param = os.pullEvent("key") if sEvent == "key" then if param == 2 then sleep(0.01) create() end end end create = function() clear() write"Room ID: " data = read() label = data clear() print("Creating key...") reader.beginWrite(data,label) sleep(1) os.pullEvent("mag_write_done") print("Process Complete! Room key: "..data) clear() end login = function() clear() print("logging in...") sleep(1) clear() term.setCursorPos(5,10) write"Password: " pass = read("*") if pass == password then menu() else clear() login() end end --Mission Control login()