MarioRossi93i Posted May 17, 2020 Share Posted May 17, 2020 start = os.time() timeout = 1 stop = start + timeout f = 0 m = {} while stop > os.time() do m[f] = 'Iter N. '..f f = f + 1 end print(m) os.exit() Output: Script terminato: [75781] = 'Iter N. 75781', [75782] = 'Iter N. 75782', [75783] = 'Iter N. 75783', *** [85140] = 'Iter N. 85140', [85141] = 'Iter N. 85141', [ 0] = 'Iter N. 0', } Uscita. Link to comment Share on other sites More sharing options...
ItsSC Posted May 19, 2020 Share Posted May 19, 2020 Because you asked the script to do this, yet you ask why he do this .. ? Link to comment Share on other sites More sharing options...
MarioRossi93i Posted May 19, 2020 Author Share Posted May 19, 2020 Thanks for the reply, but I don't understand what happened to the values from 1 to 75780. I would like to get 0, 1, 2, etc Link to comment Share on other sites More sharing options...
Administrators Enyby Posted May 19, 2020 Administrators Share Posted May 19, 2020 Output limited few last lines. Obviously it is cropped when you try out unreal amount of text. Link to comment Share on other sites More sharing options...
ItsSC Posted May 19, 2020 Share Posted May 19, 2020 If you want to read fully. Use start = os.time() timeout = 1 stop = start + timeout f = 0 m = ""; while stop > os.time() do m = m .. "Iter N. ".. f .. "\n" f = f + 1 end io.open("/sdcard/Download/Output.lua","w"):write(m) os.exit() this can get full content with no text limit. Link to comment Share on other sites More sharing options...
Administrators Enyby Posted May 19, 2020 Administrators Share Posted May 19, 2020 3 minutes ago, ItsSC said: tostirng(m) Can simply ended OOM. Better write line by line directly to file, instead of store in table. It is very expensive and eat a lot of memory. [added 4 minutes later] gg.saveVariable also better suit for this because especially optimized for work with huge tables without OOM. Link to comment Share on other sites More sharing options...
MarioRossi93i Posted May 19, 2020 Author Share Posted May 19, 2020 @ItsSC @Enyby thank you very much for your support, now it s working fine!! Link to comment Share on other sites More sharing options...
Question
MarioRossi93i
Output:
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.