From: "OxO pHz.60" Date: 2005-08-31T23:27:20+09:00 Subject: Error with a not useful message. ------=_Part_747_3014172.1125498436044 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline hi when i try to run this ruby script (a mud client for angalon) y get the= =20 following error rorschach@pirata ~/Sources/ainamc $ ruby ainamc.rb ainamc.rb:125: syntax error Gtk.main ^ i have no idea what the error might be, i with post all code here: require 'gtk2' require 'net/telnet' class Mud attr_accessor :host, :port, :mud def initialize( host, port =3D 23 ) @host =3D host @port =3D port end def add_mud( host , port ) if @host !=3D nil @mud =3D Net::Telnet::new( { "host" =3D> @host , "port" =3D> @port } ) end end end #todo: poner todo lo referente a la gui en bajo la clase gui. Gtk.init #Widget Definitions main_window =3D Gtk::Window.new vbox =3D Gtk::VBox.new( false, 0) hbox =3D Gtk::HBox.new( true , 0) scroll =3D Gtk::ScrolledWindow.new output =3D Gtk::TextView.new input =3D Gtk::Entry.new button_connect =3D Gtk::Button.new( "Connect" , use_underline=3Dfalse ) button_disconnect =3D Gtk::Button.new( "Disconnect" , use_underline=3Dfalse= ) scroll.set_policy( Gtk::POLICY_NEVER , Gtk::POLICY_AUTOMATIC ) #need to chomp input every n lines so window doesn't expand on its own. scroll.add( output ) main_window.add( vbox ) vbox.pack_start( hbox , false , false , 0 ) hbox.pack_start( button_connect , true , true , 0 ) hbox.pack_start( button_disconnect , true , true , 0 ) vbox.pack_start( scroll , true , true, 0 ) #output or scroll vbox.pack_start( input , false , false, 0 ) output.editable =3D false output.set_wrap_mode(Gtk::TextTag::WRAP_WORD) #Signals main_window.signal_connect("delete_event") { Gtk.main_quit false } input.signal_connect("activate") do output.buffer.insert(=20 output.buffer.end_iter, input.text + "\n") angalon.mud.puts( input.text ) output.scroll_to_iter( output.buffer.end_iter , 0 , false , 0 , 0 ) input.text=3D"" end begin button_connect.signal_connect("clicked") { angalon =3D Mud.new( "angalon.tamu.edu " , 3011 ) angalon.add_mud } button_disconnect.signal_connect("clicked") do angalon.mud.close() end main_window.set_default_size( 512, 512 ) main_window.show_all Gtk.idle_add{ output.scroll_to_iter( output.buffer.end_iter , 0 , false , 0 , 0 ) } Gdk::Input.add( mud , Gdk::Input::READ ) {=20 data =3D angalon.mud.recv( 32 ) data =3D angalon.mud.preprocess( data ) output.buffer.insert( output.buffer.end_iter , data ) output.scroll_to_iter( output.buffer.end_iter , 0 , false , 0 , 0 ) } Gtk.main --=20 Rorschach el Pirata I eat pokemon with scars ------=_Part_747_3014172.1125498436044--