icon_state = round(10)
Yeah, it sucks, doesn't it?
Help will be appreciated... >_<
[Edit]: NOTE: 'Tis not a DBZ Game... x_x
ID:268534
Aug 22 2004, 9:48 am (Edited on Aug 22 2004, 9:54 am)
|
|
=/ 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 |
Aug 23 2004, 7:04 am
|
|
Look it up, the first argument is the number to be rounded and the second is how you want it rounded.
|
In response to Loduwijk
|
|
You can also simply use (N-N%10). % is the modulo operator, which gives the remainder after division.
|