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.

1
2
3
4
5
6
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     

am not sure whether this is the reason but, did you miss one ")" from the code in line 3

1
local timerSpriteSheet = sprite.newSpriteSheetFromData( 'skins/' .. skin .. '/timer.png', timerSheetData.getSpriteSheetData())

That ending ")" didn't copy over, but it is there.

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.

views:1369 update:2011/9/28 8:56:32
corona forums © 2003-2011