Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local fileLog
- function openLog(path, force)
- if force then closeLog() end
- if not path then path = "log.txt" end
- if not fileLog then fileLog = io.open(path, "a") end
- end
- function log(text, close)
- openLog()
- fileLog:write(text)
- fileLog:flush()
- if close then closeLog() end
- end
- function closeLog()
- if fileLog then
- fileLog:close()
- fileLog = nil
- end
- end
- openLog("assetLog.txt")
- log("Escape mission arrived: yes\n---\n")
- closeLog()
- managers.menu_component:post_event("menu_enter")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement