Sprite Error newbie question

I’m just getting started and I can’t get sprites to work. I’m doing as simple a code as I can right out of tutorials but I get the error ’ bad argument #1 to newSprite (Image sheet expected, got nil).’ I have no idea what I’ve missed and would appreciate some help.

Code is below:

display.setStatusBar(display.HiddenStatusBar)

objGroup = display.newGroup()

options = {
   width = 32,
   height = 32,
   numFrames = 6,
   sheetContentHeight = 32,
   sheetContentWidth = 192
}

shipSheet = graphics.newImageSheet( “ShooterStrip.png”, options )

 sequenceData = {
   { name = “all”, start=1, count=6, time=0,   loopCount=1 }
}

spaceshipImg = display.newSprite(shipSheet, sequenceData)
spaceshipImg.x = display.contentWidth/2
spaceshipImg.y = display.contentHeight-48
spaceshipImg.speed = 4
spaceshipImg:setSequence(“all”)
spaceshipImg:setFrame(1)

objGroup:insert(spaceshipImg)

local function moveShip(event)
    if event.x < display.contentWidth/2 then
        spaceshipImg.x = spaceshipImg.x - spaceshipImg.speed
        end
    if event.x > display.contentWidth/2 then
        spaceshipImg.x = spaceshipImg.x + spaceshipImg.speed
        end
end

Runtime:addEventListener(“touch”,moveShip)
 

Well I would suspect that if you’re getting that error, that you likely have a problem with your graphics.newImageSheet() call.  Perhaps ShooterStrip.png doesn’t work (be careful with the mixed case name when moving to a real device.).  There may be more errors or warnings in your console log. 

Are you on a Mac or Windows?  Are you using a 3rd party IDE?  How are you starting Corona?

Actually, it was a naming problem – the filename wasn’t exactly as I had it in the code. Thanks for helping out. I feel dumb now.

Cheers.

Not something to feel dumb about.  It’s one of the most common problems and it bites even the most seasoned programmer.

Well I would suspect that if you’re getting that error, that you likely have a problem with your graphics.newImageSheet() call.  Perhaps ShooterStrip.png doesn’t work (be careful with the mixed case name when moving to a real device.).  There may be more errors or warnings in your console log. 

Are you on a Mac or Windows?  Are you using a 3rd party IDE?  How are you starting Corona?

Actually, it was a naming problem – the filename wasn’t exactly as I had it in the code. Thanks for helping out. I feel dumb now.

Cheers.

Not something to feel dumb about.  It’s one of the most common problems and it bites even the most seasoned programmer.