Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlphonse Cuccurullo
2,513 PointsLol. OK, just cope with me here. I was just trying to have fun with the code and what do you know I'm at a dead end.
So hopefully your a dragonball fan... If not just work with me here please. lol. anyways I'm trying to make it so when it asks for 7 ball amount then my function would activate when I put 7 down. I am almost positive the function I jotted down is the reason for this problem. I even added a gets method to it which I think isn't allowed. As you can see my syntax is all over the place. Hopefully this dont confuse anybody. =)
i summon a dragon
print " choose a name "
name = gets.chomp.capitalize
if name.length == 8
puts "Sweet that's 8 character's"
elsif (name.length > 8) || (name.length < 8)
puts"Shame it dont have 8 character's"
else
puts"That's a number please type a character."
end
last = gets.chomp.capitalize
if (last.length == 8) || (name.length == 8 )
puts " Your name is #{name} #{last} "
else
puts "fuck you need another 8 character name\n"
end
puts " i summon shenron"
puts"Please place number of balls here"
def dragonball (shenron)
shenron = "1_star" , "2_star" , "3_star" , "4_star" , "5_star" , "6_star" ,"7_star"
return shenron
gets.chomp.capitalize.to_i
if shenron.length == 7
puts" #{name} #{last} what is your wish?\nGrant me success "
puts"\ti can not!\nit far beyon my power to expand a humans capabilities, only you have to strength to unlock your hidden potential\n......your right i can do this shenron let's get lit we got some brain storming to do\nShenron: umm what?cough cough dammit your wish shalll be granted."
else
puts"you dont have the balls"
end
end
gets.chomp.capitalize