I have an error while trying to open my file.
I have an script that will save your text and when you type "/write" h the script will type what you save.
This is the script:
function save(command, text)
local myFile = fileCreate(myPath)
fileOpen(myPath)
fileWrite ( myFile, text )
fileClose(myFile)
end
addCommandHandler("save", save)
function writeSaved()
local myFile2 = fileOpen(myPath)
size = fileGetSize(myFile2)
savedText = fileRead ( myFile2, size )
outputChatBox(savedText)
fileClose(myFile2)
end
addCommandHandler("write", writeSaved)
I forgot to tell you in the start i put:
myPath = "test.txt"