Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** Netplay Main
- #------------------------------------------------------------------------------
- # After defining each class, actual processing begins here.
- #==============================================================================
- begin
- $mouse = Game_Mouse.new
- # Call main method as long as $scene is effective
- while $scene != nil
- $scene.main
- end
- # Fade out
- Network::Main.close_socket
- Graphics.transition(25)
- exit!
- rescue Errno::ENOENT
- Network::Main.close_socket
- # Supplement Errno::ENOENT exception
- # If unable to open file, display message and end
- filename = $!.message.sub("No such file or directory - ", "")
- print("Unable to find file #{filename}.")
- time = Time.now
- time = time.strftime("%a %d %b %Y, %X")
- File.open("ErrorLog.rxdata","a+"){ |fh| fh.puts("On <<#{time}>> the file <<#{filename}>> was missing." )}
- ensure
- Network::Main.close_socket if Network::Main.socket != nil
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement