ID:268534
 
=/ I'm making a side game... besides Slime Warrior... and it consists of "Energy" bars, and, =/ I'm wondering how to "round" the icon state to the nearest ten... This, is my attempt
icon_state = round(10)

Yeah, it sucks, doesn't it?
Help will be appreciated... >_<

[Edit]: NOTE: 'Tis not a DBZ Game... x_x
Look it up, the first argument is the number to be rounded and the second is how you want it rounded.
var/N=text2num(icon_state)
N=round(N,10)
icon_state=num2text(num)
In response to Loduwijk
You can also simply use (N-N%10). % is the modulo operator, which gives the remainder after division.