Right now, it seems that the problem is caused by the line:
[lua]local widget = require’widget’[/lua].
My score system uses the following code:
[lua]local scoreText = display.newRetinaText( “Score: X ft”, 15, 5, “Palatino”, 22 )
group:insert(scoreText)
scoreText:setReferencePoint( display.TopLeftReferencePoint )
scoreText.x = 20
scoreText.y = 5 + display.screenOriginY
points = display.newRetinaText ( “Bonus Points: 0”, 140, 5, “Palatino”, 22 )
points:setReferencePoint( display.TopCenterReferencePoint )
points.x = 230
points.y = 5 + display.screenOriginY
group:insert(points)
local total = display.newRetinaText( “Total: 0”, 335, 5, “Palatino”, 22 )
group:insert(total)
total:setReferencePoint( display.TopRightReferencePoint )
total.x = 430
total.y = 5 + display.screenOriginY
gameTime = 1
totalScore = 1
function timerUpdate( event )
–print(“score updating”)
gameTime = gameTime+1
scoreText.text = “Score: “…gameTime…” ft”
totalScore = gameTime + score
storyboard.GameScore = totalScore
total.text = "Total: "…totalScore
end
scoreTimer = timer.performWithDelay(100, timerUpdate, 0)[/lua]
When I comment out the widget line, the scoring works fine. But when that line is not commented out, it the timer updating function won’t update.
Please help! I was planing on submitting this week, so I need to figure this out soon!
Thanks
Peter
EDIT: It works fine as long as the widget line hasn’t been called anytime before in the runtime of the app. So, if the widget line is commented out in the play screen, but was called earlier while on the menu screen, the score updating won’t work. [import]uid: 38000 topic_id: 21386 reply_id: 84817[/import]