• 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 file_text_read_real returning "inf"

Acid Reflvx

Member
Hello,
I'm having trouble with the file_text_read_real command. I've saved a large amount of numbers with file_text_write_string.
Example:
1000000186134000021000000186134000021000000512085000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021000000865125000021000000186134000021000000512085000021

(It's to save object information; I'm making an editor)
When I try to read the numbers, all it returns is "inf". I'm guessing this stands for infinity and that that isn't what I want; I want the numbers!

So... how can I fix this? Should I use a different way of extracting information from a txt, or maybe use another type of writer/reader command?

Thanks!
 

TsukaYuriko

☄️
Forum Staff
Moderator
You saved a large amount of numbers, but did you save an equally large amount of newlines that separate this data...? :) If you don't do that, the engine has as much of an idea as I do regarding how to split the numbers from that file. I could guess. The engine can't and won't, it will read all of that as a single number, which is too large to store in memory, so it's considered infinite.
 

Acid Reflvx

Member
You saved a large amount of numbers, but did you save an equally large amount of newlines that separate this data...? :) If you don't do that, the engine has as much of an idea as I do regarding how to split the numbers from that file. I could guess. The engine can't and won't, it will read all of that as a single number, which is too large to store in memory, so it's considered infinite.
Aha, I wasn't doing that. Thank you!
 
Top