Line 14 won't display image

Trying to display the title. But it comes up a black screen. Let me know how to fix it. Thanks!

[code]
module(…, package.seeall)
–Status bar, like power and such at top
display.setStatusBar( display.HiddenStatusBar ) – hide the status bar from the top

local director = require(“director”)
local ui = require(“ui”)

function new()
localGroup = display.newGroup(

local function spawn_images()
local menudisplay = display.newImage(“title.png”)
menudisplay.x = display.contentWidth/2
menudisplay.y = display.contentHeight/2
menudisplay.isVisible = true
menudisplay.isBodyActive = false
localGroup:insert(menudisplay)

–local localBackground = display.newGroup()
–local background = display.newImage(“bg2.png”)
–localBackground:insert(background)

–Put it behind other display groups
–localBackground:toBack()

return localGroup --you need this line for ALL your scence, this was missing
end
[/code] [import]uid: 19768 topic_id: 6933 reply_id: 306933[/import]

I also put end before

end  
return localGroup  

So that way it doesn’t come up with any more errors. However, the image still will not show up. Thanks. [import]uid: 19768 topic_id: 6933 reply_id: 24262[/import]

Anybody Help? [import]uid: 19768 topic_id: 6933 reply_id: 24283[/import]

Look at your newGroup(
^
Missing ) [import]uid: 11809 topic_id: 6933 reply_id: 24284[/import]

Also you need to have return localGroup inside the new() function too. Also, why do you use .isVisible = true. That is set to true when you make the object. [import]uid: 11809 topic_id: 6933 reply_id: 24285[/import]

That’s weird. Cause on the thing I posted, it shows the parentheses isn’t there. Yet on mine it is there. And I do it, in case of future changes, If I need to make it false. Also, it already is returning Local Group. See the new code that I posted below.

And it’s still not displaying. Here’s the current updated code.

[code]
module(…, package.seeall)
–Status bar, like power and such at top
display.setStatusBar( display.HiddenStatusBar ) – hide the status bar from the top

local director = require(“director”)
local ui = require(“ui”)

function new()
localGroup = display.newGroup()

local function spawn_images()
local menudisplay = display.newImage(“title.png”)
menudisplay.x = display.contentWidth/2
menudisplay.y = display.contentHeight/2
menudisplay.isVisible = true
menudisplay.isBodyActive = false
localGroup:insert(menudisplay)

–local localBackground = display.newGroup()
–local background = display.newImage(“bg2.png”)
–localBackground:insert(background)

–Put it behind other display groups
–localBackground:toBack()

end
return localGroup
end
[/code] [import]uid: 19768 topic_id: 6933 reply_id: 24291[/import]

This may seem like a dumb question but I have to ask it, do you call the function? [import]uid: 11809 topic_id: 6933 reply_id: 24299[/import]

This might seem like a dumb answer… but I have no freaking idea what your talking about :slight_smile: lol

Haha so can you please just help me? What you see is what you got. lol All of that is all of my menu coding.

I’m trying to do the menu page for my game. [import]uid: 19768 topic_id: 6933 reply_id: 24304[/import]

Get rid of the function new()
end

This is your main.lua and it will not work for director. You only need it for lua files after the main.
[import]uid: 11809 topic_id: 6933 reply_id: 24312[/import]

This isn’t my main. I already have my main. This is the MENU page. [import]uid: 19768 topic_id: 6933 reply_id: 24315[/import]

Try this code, call the function see line 3 from the bottom
module(…, package.seeall)
–Status bar, like power and such at top
display.setStatusBar( display.HiddenStatusBar ) – hide the status bar from the top

local director = require(“director”)
local ui = require(“ui”)

function new()
localGroup = display.newGroup()

local function spawn_images()
local menudisplay = display.newImage(“title.png”)
menudisplay.x = display.contentWidth/2
menudisplay.y = display.contentHeight/2
menudisplay.isVisible = true
menudisplay.isBodyActive = false
localGroup:insert(menudisplay)

–local localBackground = display.newGroup()
–local background = display.newImage(“bg2.png”)
–localBackground:insert(background)

–Put it behind other display groups
–localBackground:toBack()

end
spawn_images()
return localGroup
end [import]uid: 11809 topic_id: 6933 reply_id: 24316[/import]

That works! Thanks a ton!! [import]uid: 19768 topic_id: 6933 reply_id: 24319[/import]