• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Runner crashes for too long a string - any workaround?

I

IndirectY

Guest
I'm writing a script to parse a really long wall of text from clipboard, which is about 9k lines (2MB).

When I'm trying to use functions like string_length or string_pos, the runner just crashes without any warning messages.

I am trying to split the string into small ones but as I said, the runner just crashes.

Is there any workaround to solve this?

What I can think of is reading from a file line by line instead of from clipboard, but that would be really annoying to write and use the script.
 
Last edited by a moderator:
Reading files line by line is the standard way of doing it. I've definitely never tried to read long lines from clipboard. If you let us know what the actual goal you're trying to achieve is, maybe there'll be some suggestions as to how to optimise the process properly.
 
I

IndirectY

Guest
I'm writing a script to parse an html of a webpage with horrible UI, so I can just extract data from that. The thing is that the whole webpage is 9k lines as I wrote. If I can just split the text into usable pieces then I can start from there, but it seems I'll have to modify the text first with other programs or read from a saved text file.
 
Top