keymetaphore Posted February 20, 2017 Share Posted February 20, 2017 Hello, i've got a small issue now. I am creating a dx box with some things up, and included player health. The problem is that when your health gets reduced, it's like 90.41415236923 ( not a int ) How to remove decimals? I tried to use the math.round from useful functions, but got a strange error. When outputting I used tonumber() Link to comment
Syntrax# Posted February 20, 2017 Share Posted February 20, 2017 math.ceil(number) for health, due the fact 1 hp will be considered as 0 when using math.floor 1 Link to comment
keymetaphore Posted February 20, 2017 Author Share Posted February 20, 2017 Thanks man, it worked, gotta go through the math functions again. <3 1 Link to comment
Syntrax# Posted February 20, 2017 Share Posted February 20, 2017 Just now, Gourmet. said: Thanks man, it worked, gotta go through the math functions again. <3 No problem if you have any other problem feel free to contact me through pm 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now