I’m trying to make a simple corona sdk game but I can’t get it working. The score text just doesn’t change.
The functions:
function points(num)
addPoints()
score = score + num
scoreTxt.text = "score: " … score
scoreTxt:setReferencePoint(display.TopLeftReferencePoint)
end
function addPoints()
num = math.random(100, 350)
end
Some other information:
score = 50;
num = 50;
scoreTxt = display.newText (“Score:”, 0, 0, “Helvetica”, 20)
scoreTxt:setReferencePoint(display.TopLeftReferencePoint)
scoreTxt.x = display.screenOriginX + 10
scoreTxt.y = display.screenOriginX + 5
Thanks in advance