Help whit returning

Hey i dont know how to return line nr 69-71 to 81-82
can i get some help here?

def death()

def cave()
  blk = {return}

puts "The Game"

puts "Chose yourself a name"
  name = gets.chomp

puts "Welcome #{name} now you'r journey will start good luck"

puts "You are in the jungel and trying to get out of there."
puts "You are walking and walking.........................."
puts "Trying to find somthinge that can help yourself......"
puts "What is that thing over there?"
puts "Oh no a hell of a big snake!"
puts "What will you do?"
puts "(1)Try to run away? or (2)Try to kill it?"
  running = gets.chomp

  if running == "1"
      puts "You are trying to run away but you fall and the snake got
  return death

  elsif running == "2"
    puts "You are running to the snake and take a big jump and hit the
    puts "in the head and you killd it and you take the snake whit you
    puts "in case you need it to later."

  else running
     puts "Idiot u died"
  return death

puts "you are getting deeper into the jungel you are doing it great."
puts "you see a old house there and walk to it and looks at it and"
puts "find out you are goin to go in there."
puts "lucky you you find a backpac, knife and a rope."
puts "(1) Do You want to go out of the house Or (2) Do you want to
go to the
secund floor?"
  house = gets.chomp

  if house == "1"
    puts "You leave the house whit your stuff."

  elsif house == "2"
    puts "You'r walking to the secund floor and looking around all suden
u fall
                    down a hole"
    50.times { print "You are Falling."}
  return death

  else house
    puts "you died!"
  return death

puts "You see a cave."
puts "Do you want to check it out?(1) or do you want to try to get out
of the
  cave = gets.chomp

  if cave == "1"
    puts "You are going to the cave."
  return cave

  elsif cave == "2"
    puts "you are going deeper into the jungel"

  else cave
    puts "you didnt do anything a tiger killd you"
  return death

puts "You are going in the cave all suden u hear that the exit"
puts "was covered whit big rocks you have to find another way out."



Posted via

It's very important when programming to have accurate spelling.

Anyway, when you're using "return death" you're actually calling a
method which kills the process, so there's nothing to return to. You may
as well skip "return" and just write "death" if that's your objective.


Posted via