From: "Nick G." Date: 2013-03-25T01:55:22+09:00 Subject: Writing a game, trying to make dynamic loops Hey there, This is likely very simple, but I haven't stumbled across the right code yet. I want the following to take place: [code] class Player end puts "How many players?" players = gets() players.each { # Trying to make this loop run based on the number entered, but writing it this way causes an error puts "Name of player?" playername = gets() # This is also where I get stuck. I want to make an object named after what is stored as playername playername = Player.new??? Doesn't seem to work } [/code] I did go through several Google searches, and I can't seem to find the location of a break down on loops that run based on user input. Any tips would be appreciated! :) Thanks, Draekhost PS: I hope this code was small enough to just toss in here. Sorry if it's not! -- Posted via http://www.ruby-forum.com/.