corona - Lua - nil value -


i following error message corona sdk : attempt call field "imagesheet" (a nil value) stack traceback. can point out mistake?

   local ispar = {     width = 2541,     height = 264,     numframes = 7  } local imagesheet = graphics.imagesheet("apus.png, ispar")  local apussequencedata = {   {name = "fly", frames {1,2,3,4,5,6,7}, time = 800, loopcount = 0}   }  local apus = display.newsrpite(imagesheet, apussequencedata) apus.x = display.contentwidth/2 apus.y = display.contentheight/2 apus:play() 

you got function name wrong, supposed graphics.newimagesheet. misplaced quotation marks when calling it. , afterwards misspelt newsprite

this code should work:

local ispar = {     width = 2541,     height = 264,     numframes = 7 } local imagesheet = graphics.newimagesheet("apus.png", ispar)  local apussequencedata = {{name = "fly", frames = {1,2,3,4,5,6,7}, time = 800, loopcount = 0}}  local apus = display.newsprite(imagesheet, apussequencedata) apus.x = display.contentwidth/2 apus.y = display.contentheight/2 apus:play() 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -