Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Initialize()
- sFileToRead = SELF:GetOption('FileToRead')
- end
- function Update()
- hReadingFile = io.open(sFileToRead)
- if not hReadingFile then
- print('LuaTextFile: unable to open file at ' .. sFileToRead)
- return
- end
- sAllText = hReadingFile:read("*all")
- sAllText = string.gsub(sAllText, "\t", " ")
- sAllText = string.gsub(sAllText, "#\n", "---------------------------------------------\n")
- io.close(hReadingFile)
- return tostring(sAllText)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement