Hi, I’m fairly new to this so it’s probably an easy fix, but I’ve tried everything I can think of and can’t figure it out.
What’s happening is I’ve loaded a sprite into my project but I keep getting these errors intermittently:
WARNING: Supplied frameIndex(4) exceeds image sheet’s maximum frameIndex (2). Value will be clamped.
Here’s my code for loading a sprite:
local spriteSheet = graphics.newImageSheet("sprites/player.png", {width = 30, height = 30, numFrames = 4}) local sequenceData = { name = "walk", start = 1, count = 4, time = 500, loopCount = 0, loopDirection = "forward" } player = display.newSprite(spriteSheet, sequenceData)
Attached is the file I’m using for a sprite.
Any ideas why it’s not working correctly?