ID:179497
 
How could i make it so i could have a number round up form a decimal
like experience
Thanx
To round normally, use round(x,1). To cut off the part after the decimal (for positive numbers, this is the same as finding the floor), use round(x).

To find the ceiling of a positive number, you'll have to be a little more creative. round(x) will give you a floor in this case, but if you want to always round up, you'll have to add 1. However, there's the special case where x==round(x), so you should try this:
((x==round(x))?(x):(round(x)+1))

If you insert that into a stat panel or something:
stat("Strength",(x==round(x))?(x):(round(x)+1))

Lummox JR
In response to Lummox JR
I got it to work but this is what i used
usr.expreq=round(usr.expreq+1)
I dont know what you were gettin at but it was not needed
this was the only thing needed and it worked
In response to Greg
What he was "getting at" is that in your game, if I kill a monster who gives 5 experience, I'll earn 6 experience for it! You call that rounding? I suggest you go back and read through Lummox's post again... if you don't understand some of the terms, do a little research on the subject and you'll probably learn something you can use all over the place.