"module 'sprite' not found

Hi everyone,

I was just wondering if anyone knows what this error mean.

Do I have to include the sprite library to my project ?

Here’s my code :

--display groups local hudGroup = display.newGroup()--Disaplays the Hud local gameGroup = display.newGroup() local levelGroup = display.newGroup() local stars = display.newGroup() --Displays the stars. --Modules local sprite = require("sprite") local physics = require("physics") local mCeil = math.Ceil local mAtan2 = math.atan2 local mPi = math.pi local mSqrt = math.sqrt --Game objects local background local ground local powerShot local arrow local panda local poof local starGone local scoreText local gameOverDisplay --Variables local gameIsActive = false local waitingForNewRound local restartTimer local counter local timerInfo local numSeconds = 30 --Time the round starts at. local counterSize = 50 local gameScore = 0 local starWidth = 30 local starHeigth = 30 local startNewRound = function() if panda then local activateRound = function() waitingForNewRound = false if restartTimer then timer.cancel(restartTimer) end ground:toFront() panda.x = 240 panda.y = 300 panda.rotation = 0 panda.isVisible = true panda.isBodyActive = true local pandaLoaded = function() gameIsActive = true panda.inAir = false panda.isHit = false panda:toFront() panda.bodyType = "static" end transition.to( panda, {time = 1000, y = 225, onComplete = pandaLoaded } ) end acrivateRound() end end

Unless I did something wrong in my code…

Please help.

this is the error.

module 'sprite notfound:ressource (sprite.lu) does not existe in archive no field package.preload['sprite'] no file 'C:\Users\leon\Appdata\roaming\corona

The old sprite library was deprecated over a year ago and removed from the core.  However, we open-sourced the code for the library.  Go to:  

https://github.com/coronalabs/framework-sprite-legacy

Download “sprite.lua” and drop it in the folder with your “main.lua” and it should fix this problem.   Keep in mind the old sprite library is not very efficient.  It doesn’t handle dynamic images very well.  The “display.newSprite()” is the modern way to deal with sprites.  See: http://docs.coronalabs.com/api/library/display/newSprite.html for more information.  You can future proof your app by switching to the new sprite methods. 

The legacy sprite library is no longer being maintained.  I don’t know how well it works with the Graphics 2.0 engine that we are using today and we will not be providing any support, bug fixes and such to the legacy sprite library.

Rob

this is the error.

module 'sprite notfound:ressource (sprite.lu) does not existe in archive no field package.preload['sprite'] no file 'C:\Users\leon\Appdata\roaming\corona

The old sprite library was deprecated over a year ago and removed from the core.  However, we open-sourced the code for the library.  Go to:  

https://github.com/coronalabs/framework-sprite-legacy

Download “sprite.lua” and drop it in the folder with your “main.lua” and it should fix this problem.   Keep in mind the old sprite library is not very efficient.  It doesn’t handle dynamic images very well.  The “display.newSprite()” is the modern way to deal with sprites.  See: http://docs.coronalabs.com/api/library/display/newSprite.html for more information.  You can future proof your app by switching to the new sprite methods. 

The legacy sprite library is no longer being maintained.  I don’t know how well it works with the Graphics 2.0 engine that we are using today and we will not be providing any support, bug fixes and such to the legacy sprite library.

Rob