1. Because floats are not precise enough, you need to use double for more accurate values.
2. There is no function for that. The simplest way might be
3. Better is a thing of definition. You could use some kind of an ini file and parsing, would perhaps be cleaner. Or if you know the order in which the data are in the file, you can simply assign them. (I do that with my language file, only the content, no key names in front etc. Allows straight reading into a string reference)
2. There is no function for that. The simplest way might be
function round:string(value:double,digit:int) ' return type must be string otherwise it will have more than 2 digit value :* (10:double)^digit local valuei:int = int(value) local result:string = string(valuei) result = left(result, result.length - digit) + "." + right(result,digit) return result end function
3. Better is a thing of definition. You could use some kind of an ini file and parsing, would perhaps be cleaner. Or if you know the order in which the data are in the file, you can simply assign them. (I do that with my language file, only the content, no key names in front etc. Allows straight reading into a string reference)