Getting a wired error.

Hi All,

I am working on project where I have different scenes. One of the screen let say scene3 and I have a util file where I have make functions which returns group and on scene3 I added those groups. While working I have added my first group it runs well but when I have tried to add one more group It shows error. It seems that When I have tried more than 2 group. It shows the same error. The error is like that :

Runtime error
error loading module ‘playground’ from file ‘d:\myownstuffs\corona\coron
a projects\pagenavigation\playground.lua’:
d:\myownstuffs\corona\corona projects\pagenavigation\playground.lua:396:
function at line 51 has more than 60 upvalues
stack

My Code is like that :

On Scene3 (playground.lua)
function scene:createScene( event )
local screenGroup = self.view

require(‘trial’)
trialStand = getTrialStand()
screenGroup:insert( trialStand )

rope = getRope()
screenGroup:insert( rope )
rope.isVisible = true

head = getHead()
screenGroup:insert( head )

– body = getBody()
– screenGroup:insert( body )

end

On Util file (Trial.lua)

function getBody()
local bodyGroup = display.newGroup()

– Code blocks

return bodyGroup
end

function getHead()
local bodyGroup = display.newGroup()

– Code blocks

return bodyGroup
end

function getTrial()
local bodyGroup = display.newGroup()

– Code blocks

return bodyGroup
end

function getRope()
local bodyGroup = display.newGroup()

– Code blocks

return bodyGroup
end

Please suggest… [import]uid: 154400 topic_id: 35271 reply_id: 335271[/import]

Please take a look at this thread. It does a good job of explaining what upvalues are and why you are having the problem and it offers suggestions on how to work around it.

http://developer.coronalabs.com/forum/2011/12/10/runtime-error-function-has-more-60-upvalues
[import]uid: 199310 topic_id: 35271 reply_id: 140275[/import]

Please take a look at this thread. It does a good job of explaining what upvalues are and why you are having the problem and it offers suggestions on how to work around it.

http://developer.coronalabs.com/forum/2011/12/10/runtime-error-function-has-more-60-upvalues
[import]uid: 199310 topic_id: 35271 reply_id: 140275[/import]