Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. #==============================================================================
  2. # ** Netplay Main
  3. #------------------------------------------------------------------------------
  4. # After defining each class, actual processing begins here.
  5. #==============================================================================
  6.  
  7. begin
  8. $mouse = Game_Mouse.new
  9. # Call main method as long as $scene is effective
  10. while $scene != nil
  11. $scene.main
  12. end
  13. # Fade out
  14. Network::Main.close_socket
  15. Graphics.transition(25)
  16. exit!
  17. rescue Errno::ENOENT
  18. Network::Main.close_socket
  19. # Supplement Errno::ENOENT exception
  20. # If unable to open file, display message and end
  21. filename = $!.message.sub("No such file or directory - ", "")
  22. print("Unable to find file #{filename}.")
  23. time = Time.now
  24. time = time.strftime("%a %d %b %Y, %X")
  25. File.open("ErrorLog.rxdata","a+"){ |fh| fh.puts("On <<#{time}>> the file <<#{filename}>> was missing." )}
  26. ensure
  27. Network::Main.close_socket if Network::Main.socket != nil
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement