bad argument #1 to 'new Sprite' (ImageSheet expected, got nil)

Hello, I’m Van

when i run my game in smart phone it always show incorrect, but evey time debug at Corona SDK it did not have problem.

I have some screens for the set at Tiled map editor

thank eveyone read my post

Hello,

Please confirm that the file name you specify for the image sheet matches the actual case-sensitive file name. On devices, file references must match case, but in the Simulator, you can do case mis-matches (well, you can but you obviously shouldn’t. :slight_smile: )

Brent

thank to you Brent, I will try this.

Van

Hello,

Now I have a new problem with new image.

local screenGroup = self.view local blueBackGround = display.newImageRect("images/BackGround/GameInterfacepixelbackground.jpg", 960, 640) blueBackGround.x = display.contentWidth/2 blueBackGround.y = display.contentHeight/2 screenGroup:insert(blueBackGround)

It’s my data where I put in there, I’m sure the data name is correct.

and it’s show on my smart phone

Runtime Error /User/mac/Documents/coronaNew/EarthTravel/ covermenu.lua:32: attempt to index local'blueBackGround'(nil value) 

I’m not for sure what’s happen with my device.

thank for read, Van

Hi Van,

Are the directories that you placed the image inside also a case-sensitive match? For example the “images” and “BackGround” folders?

Brent

Hey Brent,

It’s work!!

Thank you a lot, you save my life!!

Hello,

Please confirm that the file name you specify for the image sheet matches the actual case-sensitive file name. On devices, file references must match case, but in the Simulator, you can do case mis-matches (well, you can but you obviously shouldn’t. :slight_smile: )

Brent

thank to you Brent, I will try this.

Van

Hello,

Now I have a new problem with new image.

local screenGroup = self.view local blueBackGround = display.newImageRect("images/BackGround/GameInterfacepixelbackground.jpg", 960, 640) blueBackGround.x = display.contentWidth/2 blueBackGround.y = display.contentHeight/2 screenGroup:insert(blueBackGround)

It’s my data where I put in there, I’m sure the data name is correct.

and it’s show on my smart phone

Runtime Error /User/mac/Documents/coronaNew/EarthTravel/ covermenu.lua:32: attempt to index local'blueBackGround'(nil value) 

I’m not for sure what’s happen with my device.

thank for read, Van

Hi Van,

Are the directories that you placed the image inside also a case-sensitive match? For example the “images” and “BackGround” folders?

Brent

Hey Brent,

It’s work!!

Thank you a lot, you save my life!!