App crashes because of Sprite Sheet???

Hey so my app has run smoothly up until now and I haven't touched the spritesheets in over a month. It freezes when I hit the play button but ONLY on the device NOT the simulator. So I ran Logcat and this is the Runtime Error that I got:

I/Corona ( 1944): Lua Runtime Error: lua_pcall failed with status: 2, error message is: ERROR: Invalid parameter passed to sprite.newSpriteSheetFromData(). Frame overlaps sprite sheet.

This is my spritesheet code:

1
2
3
4
5
6
7
8
9
10
11
local sheet1 = sprite.newSpriteSheet( "catWalking.png", 52, 109 )
 
local spriteSet1 = sprite.newSpriteSet(sheet1, 1, 1)
sprite.add( spriteSet1, "cat", 1, 8, 700, 0 ) -- play 8 frames every 1000 ms
 
local instance1 = sprite.newSprite( spriteSet1 )
instance1.x = 0 --display.contentWidth / 4 + 40
instance1.y = 0 --75
 
instance1:prepare("cat")
instance1:play()

sprites arent exactly my speciality so i may be wrong here.. But im pretty sure this line:

1
local spriteSet1 = sprite.newSpriteSet(sheet1, 1, 1)

Alright I tried changing that but I still get this error:

I/Corona ( 2067): Lua Runtime Error: lua_pcall failed with status: 2, error message is: ERROR: Invalid parameter passed to sprite.newSpriteSheetFromData(). Frame overlaps sprite sheet.

Can you upload this and provide a link, if you're comfortable doing that?

One of us may be able to better assist you that way.

Peach :)

I think I'll just see If one of my friends knows whats wrong. I Don't really feel comfortably giving my project sorry :(

That's fine - if you do decide to upload no one would have to see a full project, only the sprite image and code so they could run it.

Alternatively you could butcher the sprite (scribble all over it or whatever) while keeping it the same size, that would work too.

In any case if your friends can assist you in fixing it, that's obviously a great option too.

Peach :)

views:1624 update:2012/1/9 8:53:30
corona forums © 2003-2011