Issue with SpriteSheet

I am new to Corona Development, and have run into a bit of an issue. My artist created a spritesheet in TexturePacker, and I have included it in my game.

if timePerTurn \> 0 then  
 local timerSheetData = require "timer"  
 local timerSpriteSheet = sprite.newSpriteSheetFromData( 'skins/' .. skin .. '/timer.png', timerSheetData.getSpriteSheetData()   
 local timerSpriteSet = sprite.newSpriteSet(timerSpriteSheet, 1, 37)  
 sprite.add( timerSpriteSet, "timer", 1, 37, (timePerTurn / 37) \* 1000, 1)   
end   

The code above doesn’t throw any errors, but the following code does.

if timePerTurn \> 0 then  
 local playerOneTimer = sprite.newSprite( timerSpriteSet )  
 local playerTwoTimer = sprite.newSprite( timerSpriteSet )  
end   

I get the following error when I run Corona.

Runtime error multiplayerScene.lua:71: bad argument #1 to 'newSprite' (sprite.ISpriteSet expected, got nil)  

Am I doing something wrong? I have verified that both the .lua file generated by TexturePacker and the .png spritesheet are in the folder.

Thanks in advance. [import]uid: 18601 topic_id: 12981 reply_id: 312981[/import]

am not sure whether this is the reason but, did you miss one “)” from the code in line 3
[lua]local timerSpriteSheet = sprite.newSpriteSheetFromData( ‘skins/’ … skin … ‘/timer.png’, timerSheetData.getSpriteSheetData())[/lua] [import]uid: 71210 topic_id: 12981 reply_id: 47627[/import]

That ending “)” didn’t copy over, but it is there. [import]uid: 18601 topic_id: 12981 reply_id: 47690[/import]

I have narrowed down the issue to a problem with the TimerSpriteSet. In a file by itself, this code works fine. However, in a file with other spritesheets, I am still getting the error. [import]uid: 18601 topic_id: 12981 reply_id: 47717[/import]