I’m using Corona Project Manager and just purchased Text Candy and I can’t get the sample code to work
I couldn’t find instructions on the Corona/CPM forum about Text Candy so I just followed the Particle Candy instructions on the CPM website i.e. copying the lib into the main folder and altering main.lua to match, all makes sense now I’m getting to grips with Corona.
Anyway so Text Candy is loading but gives this error… All help great appreciated ! from what I can see all files are loading correctly
–> TEXT FX SYSTEM READY.
Runtime error
…xe0k+++TI/-Tmp-/TemporaryItems/45/lib_text_candy.lua:112: sequence frames must be inside the sheet
stack traceback:
[C]: ?
[C]: in function ‘newSpriteSet’
…xe0k+++TI/-Tmp-/TemporaryItems/45/lib_text_candy.lua:112: in function ‘AddCharset’
…GMupXIf3SExe0k+++TI/-Tmp-/TemporaryItems/45/main.lua:9: in main chunk
Runtime error: …xe0k+++TI/-Tmp-/TemporaryItems/45/lib_text_candy.lua:112: sequence frames must be inside the sheet
[import]uid: 3093 topic_id: 11344 reply_id: 311344[/import]
There is a strange behaviour with the LUA string library that is shipped with Corona that converts special chars like Umlauts, Accents etc. to double-byte characters when they are passed as function parameters. This strange behaviour only happens when your modules are placed in sub-directories. Since Umlauts etc. are internally converted to double-byte characters, Text Candy believes that there are more characters specified than there actually are on the texture.
So in short:
just replace all Umlauts or Accents in your charOrder string passed with AddCharset() with characters that are not in use.
for what its worth, i’m another user who bought text candy and ran into this issue in my first 60 seconds. a google for:
text candy “sequence frames must be inside the sheet”
got me to this thread, issue listed fixed it. have you registered the byte code issue with ansca? [import]uid: 110373 topic_id: 11344 reply_id: 87237[/import]
Well, it’s not really an issue, it’s just a confusing behaviour of the LUA string library shipped with Corona. There would be a workaround for this, but unfortately, this would require bigger changes to the Text Candy lib to check for double byte chars. It’s already planned for the next updates, but will take some time because we need to do comprehensive tests before shipping. [import]uid: 10504 topic_id: 11344 reply_id: 87267[/import]