Any ideas on why .charAt() would suddenly stop working?
-
This function has been doing the job contently for some time,
but now it doesn't...Logically, this should be getting the "B" from "B6".
How would this not work? -
What is going on???
-
And now it is printing the result while still saying that the function doesn't exist!!!
-
@VirtualVirgin Snippet?
-
@d-healey I think this project is a bit too involved to make a snippet. Maybe I can try later. Here is the variable in question a little earlier in the chain, and it is also perplexing:
The variable "MPN" is being set here from a ternary and the print just before that clearly shows that noteObject.y[0] has a value: "F5"
And it shows that the direction is "up".Then again, it goes on to print a value that it says is "undefined".
A bit perplexing... seems contradictory. -
@VirtualVirgin said in Any ideas on why .charAt() would suddenly stop working?:
I think this project is a bit too involved to make a snippet.
Yeah it's probably one of those sneaky errors that appear in larger projects. Not much anyone can do without seeing it in the full context. If you can recreate it in a minimal snippet then that will help, but I expect the error won't show itself.
-
@d-healey Actually, I think I just found the error:
local MPN = direction == "up" ? noteObject.y[0] : noteobject.y[noteObject.y.length -1];
vs.
local MPN = direction == "up" ? noteObject.y[0] : noteObject.y[noteObject.y.length -1];
I forgot the camelCase on noteObject for the false branch :P