So this is the crash:
Type Mismatch. (runtime error &h18) in ...AA1xHgyO/pkg:/source/main.brs(45)
045: letterCount = len(word)
Backtrace:
Function convertcamelcase(term As ) As
file/line: /tmp/plugin/M...AA1xHgyO/pkg:/source/main.brs(45)
Function main() As
file/line: /tmp/plugin/M...AA1xHgyO/pkg:/source/main.brs(61)
Local Variables:
term &h0100 String (VT_STR_CONST) val:hello world
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=3
regex &h0010 bsc:roRegex, refcnt=1
termlist &h0010 bsc:roList, refcnt=1
index &h0002 Integer val:2
word &h0080 Invalid val:invalid
lettercount &h0010 bsc:roInt, refcnt=1
firstchar &h8010 bsc:roString (2.1 was String), refcnt=1
remainingchars &h0000 <uninitialized> val:Uninitialized
updatedword &h0000 <uninitialized> val:Uninitialized
It's telling you the error is on this line:
letterCount = len(word)
And if you look down a few lines you see that
word is invalid:
word &h0080 Invalid val:invalid
So you're passing an invalid to a function that expects a string. And the reason is that your for loop is walking off the end of the
termList array.