I'm making a fishing system, and the "algorithm" I dun chose for the exp unfortunately leaves it with a decimal place at the end.
So, like... 127 / 225.77890632 exp
As this is shown visually, it's not exactly nice to look at.
From the help file, I found that .ceil would round it up, or .truncate would get rid of any places.
I've tried each seperate. I've even tried one after the other... Neither works.
Any ideas?
Edit: Notes:
[27] = fishing exp
[28] = fishing level (rank)
[44] = exp for next level
So, like... 127 / 225.77890632 exp
As this is shown visually, it's not exactly nice to look at.
From the help file, I found that .ceil would round it up, or .truncate would get rid of any places.
I've tried each seperate. I've even tried one after the other... Neither works.
Code:
def levelup
$game_variables[28] += 1
$game_variables[44] *= 1.75
$game_variables[44].ceil
#$game_variables[44].truncate
$game_variables[27] = 0
@help.set_text('Your fishing rank is now ' + $game_variables[28].to_s + '!')
end
Any ideas?
Edit: Notes:
[27] = fishing exp
[28] = fishing level (rank)
[44] = exp for next level