Bad argument #1 to 'newSprite' (ImageSheet expected, got nil)

I keep getting this error code and can’t figure out why…

local options = {

    width = 746,

    heght = 420,

    numFrames = 2

}

local dSheet = graphics.newImageSheet(“Images/d.png”, options )

local dsequenceData = {

     name = “move”, 

     start=1,

      count=2,

       time=100,

        loopcount=0,

    }

    

local d = display.newSprite( dSheet, sequenceData)

d:sequenceData(“move”)

dSprite.x = 75

dSprite.y = 15

dSprite:play()

    

local d = display.newSprite( dSheet, sequenceData)

d:sequenceData(“move”)

dSprite.x = 75

dSprite.y = 15

dSprite:play()

It sounds like the sheet is never created. Have you made sure the image exists at the path “Images/d.png”?

File names may also be case-sensitive, so make sure the case for the path/filename is exactly the same in reality.

I checked the to make sure the image file was in the folder and check the case.  It’s still no working though.

In your options, you typed “height” incorrectly (you have “heght”). That may be the issue…

Best regards,

Brent

@Brent  Ah so simple!  that was it thank you!

It sounds like the sheet is never created. Have you made sure the image exists at the path “Images/d.png”?

File names may also be case-sensitive, so make sure the case for the path/filename is exactly the same in reality.

I checked the to make sure the image file was in the folder and check the case.  It’s still no working though.

In your options, you typed “height” incorrectly (you have “heght”). That may be the issue…

Best regards,

Brent

@Brent  Ah so simple!  that was it thank you!