so you enter in the password and it goes to another file and checks.
can anyone help me out ?
thanks -Cheeky
Posted 24 November 2012 - 11:04 AM
Posted 24 November 2012 - 11:08 AM
fileName = "file"
password = "password!@#$%"
-- readfile
fileRead = fs.open(fileName, "r")
line = fileRead.readLine() -- reads the line
lineAll = fileRead.readAll() -- reads all the text in the line
fileRead.close() -- you must close the file!
-- writing
writeFile = fs.open(fileName, "w") -- 'w' for 'write', use 'a' for 'append' { Write = will overwrite what is in the text ; Append = will add to the file }
writeFile.write(password)
writeFile.close()
Posted 24 November 2012 - 11:10 AM
local file = fs.open("fileName", "r")
contents = file.read() --should read the whole file
--or read it line by line
sLine = file.readLine()
Posted 24 November 2012 - 11:19 AM
Posted 24 November 2012 - 11:24 AM
Posted 24 November 2012 - 11:26 AM
for line in handle:lines() do print(line) end
Posted 24 November 2012 - 11:33 AM
0 members, 2 guests, 0 anonymous users