It looks like you're new here. If you want to get involved, click one of these buttons!
puffs = TexturePack.new("texturepacks/puff.txt", "texturepacks/puff.png", true) for i = 0, 3 do puff[i] = Bitmap.new(puffs:getTextureRegion("puff0"..i..".png")) end |
Comments
And also check to see if puffs is nil...
https://deluxepixel.com
Still the same error, though. Output says "puffs" is a table, is that right? File names are re-re-rechecked, all lower case.
make it no you have local texture=puffs:getTextureregion... then check texture for being nil. that way you can isolate the problem to either getting the region or creating the bitmap.
https://deluxepixel.com
Btw, how do I get the nice coloured code format in posts? (instead of just yellow)
so you need to start your for loop from 1
try
https://deluxepixel.com
And again, what tag can I use to display nicely coloured code in this forum? < pre lang = " something? " >
just only one space in string between pre and lang