Page 1 of 1

Reading and Writing Files

PostPosted: Wed Jan 21, 2004 3:33 pm
by jazz_e_bob
Script for writing text to a File:

FILE *fp;
fp = fopen("mytext.txt", "w");
fprintf(fp, "Insert Text Here");
fclose(fp);

http://class.et.byu.edu/ce594-2-win03/L ... esson.html

PostPosted: Wed Jan 21, 2004 6:09 pm
by Just4Fun
jazz_e_bob,
How would this be used with a GE actor? TIA

PostPosted: Wed Jan 21, 2004 10:06 pm
by jazz_e_bob
I tested it by using Mouse Button Down event on an actor.

Mouse Button Down calls the script.

The script writes the file.

PostPosted: Wed Mar 02, 2005 5:12 pm
by ingsan
And where do YOU write the file ?
( OK I'm one year late :) )

PostPosted: Wed Mar 02, 2005 9:04 pm
by jazz_e_bob
:D

I don't use this code since the load/save vars functions were introduced.

But I do know that older versions of GE save their var files in the GE folder.

When compiled, the var files end up in the same folder as the executable.

http://game-editor.com/forum/viewtopic.php?t=586&highlight=save+vars