code: https://pastebin.com/PZq9uhpH (https://pastebin.com/PZq9uhpH)
for some some reason, this code doesn't work correctly, even though the table goes like
{
1={
...
}
...
}
if you replace ipairs with pairs, it works correctly
Are you sure that you are using numeric indexes and not having numbers in strings?
its a number, not a string (tested with type(index))
Can you upload all of the required code and some example data to test with?
I'll try to replicate the issue and see what I can figure out for you.
Also, what version of the mod are you using? And are you on forge or fabric?
here is test data, run playnbs.lua and input "EDA.nbs": https://envs.sh/EDG.zip (https://envs.sh/EDG.zip) (oh and for some reason theres a endianness issue so this is not for production!) (i think i switched ipairs to pairs, so you will need to do that manually)
ipairs starts from 1 and goes until the first nil, your indexes don't start at 1 and so ipairs sees nil when it looks at index 1 and then stops as it assumes that the table is empty.
You might need to restructure how you are storing your table data.