From: Peter Hickman Date: 2012-12-28T21:44:39+09:00 Subject: Re: How to run a ruby script --047d7b66f24bb2cebd04d1e9067c Content-Type: text/plain; charset=ISO-8859-1 Well I took you code and pasted it into a file and went $ ruby dungeonapp.rb It works for me and should work for you. However the is a bug. The class is called Dungeonapp but you then do this my_dungeon = Dungeon.new("Fred Bloggs") Use only one name or the other. Also I updated the end bit to my_dungeon.start(:largecave) while true print "go where? " go_to = STDIN.gets.chomp my_dungeon.go(go_to) end and had to change this def find_room_in_direction(direction) find_room_in_dungeon(@player.location).connections[direction.to_sym] end Note the to_sym on the end. You cannot type a symbol in interactively so you need to convert it. A good start, keep it up. --047d7b66f24bb2cebd04d1e9067c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Well I took you code and pasted= it into a file and went

$ ruby dungeonapp.rb
It works for me and should work for you.

However the i= s a bug. The class is called=A0Dungeonapp but you then do this

my_dungeon =3D Dungeon.new("Fred Bloggs")

=
Use only one na= me or the other.

Also I = updated the end bit to

my_dungeon.start(:largecave)
while true
=A0 print "go= where? "
=A0 go_to =3D STDIN.gets.chomp
=A0 my_dungeon.go(go_to)
e= nd

and had to change this

def find_room_in_direction(direction)
=A0 =A0 fin= d_room_in_dungeon(@player.location).connections[direction.to_sym]
end

Note the to_sym on the end. You cannot = type a symbol in interactively so you need to convert it.

A good start, keep it up.
= --047d7b66f24bb2cebd04d1e9067c--