Apple experiences a strange error in my game, when I submitted it to the AppStore, so they can’t approve it.
They get a “?:0: attempts to index a nil value” error – see the attached screenshot. I am not getting
the error on the Corona Simulator or the XCode simulator (with my release build certificate), so it’s hard for me to fix the bug. I can see in the screenshot, that the error is generated when the bottom row of buttons are getting build. As you can see on the screenshot, the first button is created at (0, 0), but not
moved into place yet.
It looks like an error with an array, but the only array I use, is the text for the label, and the button already has its label attached (NEW GAME).
I’m currently building on the latest public release of Corona (2013.1076).
Here are the code for that part of the game.
local newGameButton = widget.newButton{ id = "newGame", label = \_text[7], defaultFile = "gfx/new-icon.png", overFile = "gfx/new-icon-rollover.png", width = 80, height = 44, font = "Kefa", fontSize = 12, labelYOffset = 10, labelColor = { default={ 199, 153, 131, 200 }, over={ 199, 153, 131, 255 } }, onRelease = onButtonEvent } newGameButton:setReferencePoint( display.LeftTopReferencePoint ) newGameButton.x = 0 + (\_w/8-40) newGameButton.y = \_h - 44 gameMenuGroup:insert( newGameButton )
I have other buttons in the game (on the menu screen), and they must be working, as they have to go through the menu screen, to get to the game screen.
I have released the game to Google Play, with no issues.
https://play.google.com/store/apps/details?id=com.cphcloud.mastermind
Any suggestions on how to fix the bug?