Fury Posted February 14, 2014 Posted February 14, 2014 hey there, i have a list something like that; 2132.1 1615.121 564165.122 .. .. what i want is to delete numbers after the dot "." so it'll be something like this; 2132 1615 564165 .. .. i can find the data's who have dots in it with string.find, but how can i delete them? the number's count after the dot is different for each data. so thanks for helping from now. Destruction Derby
ixjf Posted February 14, 2014 Posted February 14, 2014 You can use math.ceil or math.floor to round numbers. I used to know how to code, but then I took an arrow in the knee. Project Redivivus - Remaking Old School MTA With New Code MTA 0.6 Nightly 1 released
Fury Posted February 14, 2014 Author Posted February 14, 2014 You can use math.ceil or math.floor to round numbers. thank you, math.ceil works for me. Destruction Derby
Moderators Citizen Posted February 14, 2014 Moderators Posted February 14, 2014 You can use math.ceil or math.floor to round numbers. thank you, math.ceil works for me. Both would work, but math.ceil will round up the float number and math.floor will round it down: math.floor(5.2) --> 5 math.floor(5.9) --> 5 math.ceil(5.2) --> 6 math.ceil(5.9) --> 6 Regards, Citizen The rEvolution is coming ...
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