file_text... fizzle :(

J

jwktrucker

Guest
Hi There.
I am new to GameMaker and have been trying to learn through YouTube videos. I have been finding lots of great ones. Sometimes there is some little setting thing or a very special case that keeps the steps shown from working and I inevitably find myself there.

I have watched 6 videos on how to use the "file_text..." family of commands

Thinking that other parts of my game could be at fault I created a new project
it has one room (room0) I put one object in it and made no other changes from the default
it has one object (SoItBegins) with on event (Game Start) where I put:

txt_Hello = file_text_open_write("Hello.txt");
file_text_write_string(txt_Hello,"Here have some text");
file_text_close(txt_Hello);


A save and Play gets me an empty room the terminal window did not show that a file was created.

I run a windows7 computer

so is there something I missed or is this another case of "My Computer Hates Me"
 

jo-thijs

Member
Hi and welcome to the GMC!

I don't know why you expect the terminal to report a file has been created.

Your file will be created though, just try replacing your code with this:
Code:
txt_Hello = file_text_open_read("Hello.txt");
show_message(file_text_read_string(txt_Hello));
file_text_close(txt_Hello);
 
J

jwktrucker

Guest
I don't know why you expect the terminal to report a file has been created.
@ 7:16 Shaun Spalding points out the Output line in the terminal window or at lest the window that reminds of the terminal window I have no idea if they call it something else in GameMaker

I replaced all my code with the code above. and I got a pop up with "Here have some text" so at first I thought it did not work but that message was not in the code above so your right the file was made. This is great search c:\ for "hello.txt" and got zip.

Q1: where is this file so I can open it in notepad?
Q2: why did I not get an Output entry like in the video I just referenced?

Thank you
 
J

jwktrucker

Guest
I read that part and checked "C:\Users\jwktrucker\AppData\Local\gamemaker_studio" and it is not there. I also checked All Users then a search of the entire C drive all with no results.
 

jo-thijs

Member
Unless your game is called gamemaker_studio, you won't find it in there.

Go to explorer and type in "%localappdata%" in the address bar, press enter and you'll see a bunch of files.
One of them will have the name of your project, click on that one.
You should find your file in there.
 
J

jwktrucker

Guest
C:\Users\jwktrucker\AppData\Local\FileWriting_A\Hello.txt has been located.
Still not sure why it is not showing up in a windows explorer search but my computers have always done things that don't make sense.
 

jo-thijs

Member
I'm not sure either.
It is in an invisible folder, which might be why.
It might also not be indexed, making finding it much more dificult for windows.

Anyway, I'm glad this issue got fixed... kind of.
 
Top