Sorry for the bad question, but really simply how do this..:
1 | number = 1.9999 |
2 | --change |
3 | print (number) |
Will print 2 rather than 1.9999.. etc
So how do I get a singular number without its decimals.
Wouldn't a simple math.floor() do the job?
You need to define the type to use.
Here is the script I used:-
1 | local a = 4.0342 |
2 | print ( tonumber (string.format( "%d" ,a))) -- %d defines the type |
this uses string formatting to only take the number and not the decimals, then converts back to a number.
Hope this helps
Sorry I don't have time to find a list of data types.