Hey Mike, I haven’t been able to get your solution to work. Here is the code:
actCurRatTot = 123.456789
actCurRatTot = tostring( actCurRatTot )
string.format("%1.2f",actCurRatTot)
actCurRat = display.newText( "Actual Current Ratio: " .. actCurRatTot, 0, 0 )
However, I was able to get the code that Zwonkie provided to round the number up to the nearest hundredth.
actCurRatTot = 123.456789
actCurRatTot = math.round(actCurRatTot\*100)/100
actCurRat = display.newText( "Actual Current Ratio: " .. actCurRatTot, 0, 0 )
Did I miss something in the code for the string.format version?
Sean [import]uid: 157382 topic_id: 30251 reply_id: 121387[/import]