08-15-2023, 01:23 PM
Not pestering at all @bplus, happy to help!
What I changed to get the kelp working was to add a call to Fix() to force some of those values to integers when accessing or setting array values. QBJS is a bit more flexible with values that can be passed to arrays. So, it doesn't explicitly convert floating point numbers to integers when they are passed in as an array index. This is in part so it can natively support associative arrays (dictionaries). You can see more about this in QBJS Fun Fact #3.
What I changed to get the kelp working was to add a call to Fix() to force some of those values to integers when accessing or setting array values. QBJS is a bit more flexible with values that can be passed to arrays. So, it doesn't explicitly convert floating point numbers to integers when they are passed in as an array index. This is in part so it can natively support associative arrays (dictionaries). You can see more about this in QBJS Fun Fact #3.