Sprite Errors

Hey everyone.

I am working on my second ever project and I am play around with sprites. I am following this tutorial. http://mobile.tutsplus.com/tutorials/corona/build-an-endless-runner-from-scratch-sprite-interaction/ and about a third of the way down you have to put a large chunk of code in that introduces the sprite. 

Now I have made my own sprite sheet and adjusted all the numbers for my sprites and I get this error:

Bad argument #1 to ‘newSpriteSet’ (sprite.SpriteSheet expected, got nil)

stack traceback:

    [C]: ?

    [C]: in function ‘newSpriteSet’

    /Users/Username/Dropbox/Skyline Scramble/main.lua:199: in main chunk

So I went and had a look to see what the problem is and I have had a good search around but I just don’t get it. The little chunk of code from my game is below, obviously there is a lot more too it, I just don’t want to post it all seeing as there is a lot.

[lua]local spriteSheet = sprite.newSpriteSheet(“playerSpriteSheet.png”, 50 ,50)

local playerSet = sprite.newSpriteSet(spriteSheet, 1, 7)

sprite.add(playerSet, “running”, 1, 6, 300, 0)

sprite.add(playerSet, “jumping”, 7, 7, 1, 1)[/lua]

Any help would be greatly appreciated.

Thank you.

It’s an old tutorial using the deprecated sprite library - I’d advise not using that tutorial and checking out versions based on the newer library.

http://docs.coronalabs.com/guide/media/imageSheets/index.html

Thank you

It’s an old tutorial using the deprecated sprite library - I’d advise not using that tutorial and checking out versions based on the newer library.

http://docs.coronalabs.com/guide/media/imageSheets/index.html

Thank you