From: "Joseph S." Date: 2011-10-05T14:46:53+09:00 Subject: Re: question about method class D20 def roll_d20 1 + rand(20) end end class Attack def roll to_hit = $d20.roll_d20 hit_or_miss = to_hit > AC ? "Hit!" : "Miss!" puts "Attack roll is #{to_hit} vs. AC #{AC}. " + hit_or_miss end end AC = 10 $d20 = D20.new attack1 = Attack.new puts attack1.roll FIXED IT! i may be a beginner but i figured it out. should have been using classes from the start, silly me. -- Posted via http://www.ruby-forum.com/.