Advertisement
Guest User

expert_driver_success.lua

a guest
Sep 17th, 2013
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. local fileLog
  2. function openLog(path, force)
  3. if force then closeLog() end
  4. if not path then path = "log.txt" end
  5. if not fileLog then fileLog = io.open(path, "a") end
  6. end
  7. function log(text, close)
  8. openLog()
  9. fileLog:write(text)
  10. fileLog:flush()
  11. if close then closeLog() end
  12. end
  13. function closeLog()
  14. if fileLog then
  15. fileLog:close()
  16. fileLog = nil
  17. end
  18. end
  19.  
  20. openLog("assetLog.txt")
  21. log("Escape mission arrived: no\n---\n")
  22. closeLog()
  23.  
  24. managers.menu_component:post_event("menu_enter")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement