Splitting the subscription list into different lines

I have this table:

{{-4.82378, 0.729424, -7.18091},{-0.21796, 0.95900, 0.18116},{0.00000, 0.00000, 0},{-4.81365, 0.730056, -7.17529},{-0.16721, 0.94651, 0.27596},{0.00000, 0.00000, 0},{-4.80815, 0.739832, -7.19562},{-0.33649, 0.84809, 0.40930},{0.00000, 0.00000, 0},{-10.911, 0.727, -5.829},{0.89435, 0.44736, 0.00000},{0.00000, 0.00000, 0},{-10.91, 0.725, -5.823},{0.89435, 0.44736, 0.00000},{0.00000, 0.00000, 0},{-10.911, 0.727, -5.83},{0.89435, 0.44736, 0.00000},{0.00000, 0.00000, 0},{-3.08688, 0.55511, -5.20297},{-0.47515, 0.77221, 0.42182},{0.00000, 0.00000, 0},{-3.07362, 0.572835, -5.20486},{-0.73111, 0.66049, 0.17094},{0.00000, 0.00000, 0},{-3.07302, 0.576144, -5.22018},{-0.59853, 0.77112, 0.21710},{0.00000, 0.00000, 0},{-4.97087, 0.851932, -5.12065},{-0.45030, 0.63469, -0.62801}, etc... for 115MB}

      

It's all in one straight line, here \n

. If you noticed, each list of 3 floats is comma separated and everything is held in one big list. Lua brings me back constant table overflow

, so I think splitting this into strings would help.

How I would like to separate {{0,0,0},{1,1,1},{2,2,2}}

from something like:

{
{0,0,0}{1,1,1}{2,2,2}
}

      

so that I can put anything in between those two main curly braces and run my Rbx.Lua script without returning constant table overflow

.

+3


source to share


1 answer


If the table is too big, it doesn't matter if you add some line breaks here and there, at the end it's the same table that Lua handles.

To solve your problem, you can try to either analyze the data sections or add a result. As Lua cannot handle huge tables.



Or parse the data as a string and parse part of it piece by piece. As far as I know, strings don't have any limitation.

Everything to avoid the simultaneous storage of huge data tables.

+1


source







All Articles