Hello Nick,

it is, indeed, quite simple. gets returns the input as a string. Since 
you want it as an integer, convert it via to_i. Then, with the integer, 
you can use Integer#times instead of your each call, which will execute 
the block multiple times.

Your second problem is that you create a new player object (and assign 
it to your playername variable), but your objects of class Player are 
just hollow objects without any information (you seem to have an empty 
Player class). If you want those objects to store a name, do something like

   class Player
     def initialize( name )
       @name = name
     end
     attr_reader :name
   end

and then create your objects by Player.new( player_name_here ).

In general, I think you should see the documentation of the functions 
you want to use, and consider what they return vs. what you want. May I 
ask what tutorials you read on ruby (or programming in general)? Afaik 
all ruby tutorials cover these two topics.

Kind regards, Calvin

P.S.: Googling "ruby loop number" gives some results, of which the 
second mentions the #times method of integers. Just a heads up for 
future searches. ;)

On 24.03.2013 17:55, Nick G. wrote:
> players = gets()
> players.each {  # Trying to make this loop run based on the number
[...]
>    playername = Player.new???  Doesn't seem to work