LabiVila Posted September 1, 2015 Share Posted September 1, 2015 So hey, what I need is something to return decimal numbers, so if I have a number like: 1.34123, I need a function to return two strings, first one the number before decimals (1) and second string (34123 - the decimal numbers). I'm not expecting the full function, I just need a hand as I have no clue what to use Thanks in advance Link to comment
Moderators IIYAMA Posted September 1, 2015 Moderators Share Posted September 1, 2015 Try this:(not tested) local myNumber = 23553.3546 local myText = tostring(myNumber) local myTable = split(myText,".") local myNumber,myDecimal = myTable[1],myTable[2] outputChatBox(myNumber) outputChatBox(myDecimal) Link to comment
LabiVila Posted September 1, 2015 Author Share Posted September 1, 2015 Works, thank you so much 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