In my game I have a minigame which I’d like to allow the user to replay without going back to where they would select to play the game.
I did this with this call:
[lua]local function replayGame(e)
storyboard.reloadScene()
end[/lua]
It works great. I can reload it as many times as I want and it plays fine.
The problem arises when I want to leave that game and go back to the core game I get an error:
Runtime error
?:0: attempt to index field 'contentBounds' (a nil value)
stack traceback:
[C]: ?
?: in function '?'
?: in function 'gotoScene'
c:\projectfolder\miniGame.lua:394: in function 'onRelease'
?: in funciton (?:269)
?: in funct
line 394 in my code is just a gotoScene call:
[lua]storyboard.gotoScene(“game”)[/lua]
Any ideas why its throwing that error. I’ve tried a few things and nothing seems to work.
If I attempt to go back before hitting replay it works fine. It’s only after reloading at least once that I get this problem.
[import]uid: 69531 topic_id: 24763 reply_id: 324763[/import]