|Anonymous | Login | Signup for a new account||2013-12-09 08:07 GMT|
|Main | My View | View Issues | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003110||GameMaker: Studio||[All Projects] Functions||public||2012-05-02 13:13||2013-03-05 15:33|
|Assigned To||Russell Kay|
|Priority||High||Severity||C - General||Reproducibility||100%|
|Summary||0003110: More issues when working with text files.|
|Description||Arrr!! Again one more error when trying to work with text files.|
Next code gives an error "File is not opened for reading."
f = file_text_open_write("test");
f = file_text_open_read(f);
If I'm trying to comment next two strings
then I got error "Trying to close unexisting text file."
It doesn't work on windows and on android. Not tested on other platforms
|Attached Files||Project1.gmz [^] (168,890 bytes) 2012-05-02 13:13|
Also created file has string "1e-005 -1001 4.4895 1057.49 -1581.15 " without space as first symbol. And therefore it reads number incorrectly.
This is fifth issue with text file read-write. Please make it work already.
Erik Leppen (updater)
Use file_text_writeln(f) after eacht write_real, and file_text_readln(f) after each read_real. Then, the text file will contain every number on a separate line.
Also, f = file_text_open_read(f) should be f = file_text_open_read("test"); f is not a valid filename, so therefore you get the "file is not opened for reading" error. However I think it should give the error "not a valid filename".
By the way, I'd like to suggest to YoYo to increase the precision of written reals because as I see it here, they're cut off after two decimals.
edited on: 2012-05-02 19:53
f = file_text_open_read(f); - oops. My mistake. Sorry. No error shows now.
And I'm agree with Erik Leppen. Precision may be more accurate. Need to post new issue for this wish I suppose?
Russell Kay (administrator)
This was fixed a while back and I pointed out the error in the code back then..
Also reals are now written out at full precision Note: The first number is 1e-005 they are no longer stored at 2 decimal places...
|Copyright © 2000 - 2012 MantisBT Group|