How can I pass a whole group to another .lua?
I have tried with global variable like
function new()
local gameGroup = display.newGroup()
inventarioGroup = display.newGroup()
return gameGroup
end
in the next .lua, my next scene i just try to call inventarioGroup to front
function new ()
local gameGroup = display.newGroup()
local bg = display.newRect( 0, 0, 480, 320 )
gameGroup:insert( bg )
inventarioGroup():toFront()
-- I have tried "inventarioGroup:toFront() too
return gameGroup
end
all I get is : attempt to call global ‘inventarioGroup’ (a nil value)
and i dont know why =S
please someone help me T_T
[import]uid: 23063 topic_id: 12278 reply_id: 312278[/import]