error getting Text Candy samples to run...

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.

Example (before):

TextCandy.AddCharset (“FONT1”, “myFont”, “myFont.png”, “0123456789A Ä BCDEFGHIJKLMNO Ö PQRSTU Ü VWXYZ’*@():,$.!-%+?;#/_”, 10)

To make it work:

TextCandy.AddCharset (“FONT1”, “myFont”, “myFont.png”, “0123456789A a BCDEFGHIJKLMNO o PQRSTU u VWXYZ’*@():,$.!-%+?;#/_”, 10)

Or any other chars that are not in use. This will fix the error message you got.
[import]uid: 10504 topic_id: 11344 reply_id: 41273[/import]

THANKS X-PRESSIVE. I just had the same issue and it fixed it immediately. [import]uid: 40033 topic_id: 11344 reply_id: 52618[/import]

It took me hours to find this thread, I was thinking I’m completely stupid such easy thing
wouldn’t work.

This hint should be in the reference…

Greetings Michael [import]uid: 12632 topic_id: 11344 reply_id: 73790[/import]

You’re so right -sorry about that. Just added this to the Hints Section [import]uid: 10504 topic_id: 11344 reply_id: 73838[/import]

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]

Just purchased and ran straight into this issue today, the fix here worked a treat, glad I found it!

Just purchased and ran straight into this issue today, the fix here worked a treat, glad I found it!