Posted 31 October 2015 - 03:21 PM
Hey I am wondering on how to convert the fs.open() read into a string, here is my example of code but it doesn't work.
if not fs.exists("file") then
file = fs.open("file", "w")
file.close()
end
write(":> ")
tx = read()
file = fs.open("file", "w")
file.write(tx)
file.close()
term.clear()
term.setCursorPos(1,1)
rFile = fs.open("file", "r")
txt = rFile.readAll()
print(txt)
But it does not print the text, I am creating a user custom username and password system using fs.open() and I can not get it to read the file and check if the user input = the files text
if not fs.exists("file") then
file = fs.open("file", "w")
file.close()
end
write(":> ")
tx = read()
file = fs.open("file", "w")
file.write(tx)
file.close()
term.clear()
term.setCursorPos(1,1)
rFile = fs.open("file", "r")
txt = rFile.readAll()
print(txt)
But it does not print the text, I am creating a user custom username and password system using fs.open() and I can not get it to read the file and check if the user input = the files text