Skip to content

Warning when accessing skin.sprites[SPR2_STND].numframes

Accessing skin.sprites[SPR2_STND].numframes is impossible. skin.sprites[SPR2_STND] has the same memory address as skin.sprites, and so Lua mistakes the read as skin.sprites.numframes and raises a warning. This is because SPR2_STND is the 0th playersprite index, but I'm not sure how to create a distinction (other than hacking in a return value for skin.sprites.numframes, but that seems like an inappropriate solution to me?).

Example script: skinsprites.lua