I have a problem with just a simple counter. It counts each 100milliseconds and add 0.1 to the text and show on the simulator.
However when the 54th seconds show up, it gives many zeros. Troubleshooting it and found that the system somehow added a 0.000000000001 to the value. Pls help ~
Code:
countUpTime = 0
local timeCounter = display.newText(countUpTime, 0, 0, native.systemFont, 32*2)
timeCounter:setTextColor( 255,0,0 )
timeCounter:setReferencePoint(display.TopLeftReferencePoint)
timeCounter.x = 100
timeCounter.y = 100
local function countTimer()
countUpTime = countUpTime + 0.1
timeCounter.text = countUpTime
print(countUpTime)
end
timer.performWithDelay (100, countTimer, 0) [import]uid: 59657 topic_id: 26156 reply_id: 326156[/import]