function add()
if not fs.isDir("myNotes") then fs.makeDir("myNotes") end
local note = fs.open("myNotes/notes", "w")
print("Type your note.")
print("Or type 'exit' to reboot notes")
note = read()
if note == "exit" then
ask()
else
note.writeLine( note )
note.close()
ask()
end
end
The error is on note.writeLine(note)












