The charCodeAt function actually returns an integer (the Unicode value of the character of the specified index, defaulting to zero if no index is specified). Not sure why this worked in FB6 (even when I use a run script action to perform a simple charCodeAt on a variable I get a number), however we have updated the scripting engine for FinalBuilder 7.
If you want to reference a character from a string you can use the charAt function which will return the character at the specified index.
I am trying to migrate from FB6 to FB7 and the easiest way to do that is to not convert all my scripts at once. So ideally I need something that will work in both versions. In FB6, it won’t take a char, only an int and now in FB7 it only takes a char not an int. Any ideas?
There will probably be some corner cases where my scripting implementation doesn’t handle things as well as the old library, unfortunately I had no choice as the old library is full of assembler and doesn’t support unicode strings. It’s also something that’s not easily unit tested either.