I have my main game.lua file which has another gameplay.lua file.
In gameplay.lua I try to insert objects into mainGroup which was created in game.lua but I get this error:
…vz07_0x4fkl00000gn/T/TemporaryItems/10/gameplay.lua:15: attempt to index global ‘mainGroup’ (a nil value)
[lua] – Create and display the HUD
createHUD = function()
– Add HUD graphic
local theHUDBanner = display.newImageRect ( “HUDHeader.png”, 480, 35 )
theHUDBanner.x, theHUDBanner.y = 240, 12
mainGroup:insert(theHUDBanner)[/lua]
The ‘insert’ is on line 15 [import]uid: 10389 topic_id: 21313 reply_id: 321313[/import]