#==============================================================================
# ** Netplay Main
#------------------------------------------------------------------------------
# After defining each class, actual processing begins here.
#==============================================================================
begin
Network::Main.initialize
$Respawn = []
# Font used in windows
$defaultfonttype = $fontface = $fontname = Font.default_name = "Tahoma"
# Font size used
$defaultfontsize = $fontsize = Font.default_size = 14
$mouse = $Mouse = Game_Mouse.new
$Mouse.visible
# Sets default font settings.
Font.default_name = "Arial"
Font.default_size = 18
Font.default_color = Color.new(0, 0, 0)
Font.default_bold = false
Font.default_italic = false
# Change the $fontface variable to change the font style
$fontface = "Arial"
# Change the $fontsize variable to change the font size
$fontsize = 24
# Prepare for transition
Graphics.freeze
# Make scene object (title screen)
$scene = Scene_Connect.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