in code below it displays "SCORE: 100" or whatever however as the score / points change the totals are over lapping one on top of the other and you cant read them ... i want the old score erased / removed before displaying new score/points ANY THOUGHTS HOW TO FIX this...this is LUA and using CORONA SDK during my test i have sent print statements to try to troubleshoot sections
--Points is being calculated in another location --UPDATE SCORE POINTS
local function updateScore(Points)
if WTF == 1 then
print ("SCORE: -->",Points)
--PointsText:removeSelf(PointsText)
PointsText = display.newText(Points,0,0,native.sytemFont,42)
PointsText.text = Points
PointsText.xscale = 0.5; PointsText.yscale = 0.5
PointsText:setTextColor(155,155,225)
PointsText.x = centerX * 1
PointsText.y = centerY - 150
ScoreTxt = display.newText("Score: ",0,0,native.systemFont,40)
ScoreTxt:setTextColor(220,50,50)
ScoreTxt.x = display.contentCenterX
ScoreTxt.y = display.contentCenterY-100
end
end