You shouldn't be setting a string to a number without casting. However the bigger problem is you allocate an array based on a non-initialized variable. You should really be reallocating that array every time the variable is changed. I wonder if it throws an error there since it is the first use in the code.
Guess it is late, that non-casted number isn't being set to a string but a string array. SmileBasic really ought to throw an error for that especially when option strict is active.
See, the problem is that it WORKS to set the string array to a number. No error is thrown. And then when I add to an uninitialized variable, it's not that as an error. It gives me a type mismatch (How?) I can try initializing it, but it may not work for that reason.