WASSIm. Posted January 20, 2014 Share Posted January 20, 2014 hi guys i have question. how make string like ("-2035,148,28") to x, y, z Link to comment
Sasu Posted January 20, 2014 Share Posted January 20, 2014 local x, y, z = unpack ( split ( "-2035,148,28", ", " ) ) Link to comment
WASSIm. Posted January 20, 2014 Author Share Posted January 20, 2014 thank u. i have other question how make number exmple (-2029.6357442187) to (-2029.63) Link to comment
Karuzo Posted January 20, 2014 Share Posted January 20, 2014 maybe with math.round ? https://wiki.multitheftauto.com/wiki/Math.round Link to comment
Sasu Posted January 20, 2014 Share Posted January 20, 2014 local numberConverted = tonumber ( string.format ( "%.2f", -2029.6357442187 ) ) This will return -2029.63 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