Avdi Grimm wrote:
> You might have better luck asking for with specific sections of
> code, rather than asking us to rewrite a whole program. Try doing a
> best-guest translation to Ruby on your own, and asking about the parts
> you have trouble with.
ok so, here's the first problem:
def initialize (cen, ile, nn)
@price=cen
@amount=ile
@name=nn
@bought=0
end
def change(x)
amount--
bought++
return x-price //WHATS WRONG HERE?
end
and I get:
gut.rb:13: void value expression
return x-cena
^
gut.rb:13: syntax error, unexpected tIDENTIFIER, expecting kEND
return x-cena
--
Posted via
http://www.ruby-forum.com/.