Saving Text files

Game Editor comments and discussion.

Saving Text files

Postby willg101 » Tue Mar 08, 2005 1:55 am

When I first started using GE's new user imput actor, I instantly came up with the idea of making a mini-word processor for myself. I was wondering if it would be possible, through the new imput actor to select a file name for saving a variable/text file... I was wondering if something like the following would work.

Code: Select all
textbody=strcpy(text_body.text)
filename=strcpy(filenameactor.text)
saveVars("filename.sav", actors)


-or-

Code: Select all
textbody=strcpy(text_body.text)
filename=strcpy(filenameactor.text)
FILE *fp;
fp = fopen("filename.txt", "w");
fprintf(fp, "textbody");
fclose(fp);
http://www.wish-games.com
Old betas now available!!
User avatar
willg101
 
Posts: 473
Joined: Thu Dec 16, 2004 12:08 am
Location: West Michigan
Score: 5 Give a positive score

Postby makslane » Tue Mar 08, 2005 2:09 pm

I think you can use:

saveVars(filenameactor.text, "actors");

And:

FILE *fp;
fp = fopen(filenameactor.text, "w");
fprintf(fp, "%s", text_body.text);
fclose(fp);

But Game Editor was not designed to make word processors!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby willg101 » Tue Mar 08, 2005 4:17 pm

I know. :wink:
http://www.wish-games.com
Old betas now available!!
User avatar
willg101
 
Posts: 473
Joined: Thu Dec 16, 2004 12:08 am
Location: West Michigan
Score: 5 Give a positive score

Postby Just4Fun » Tue Mar 08, 2005 5:12 pm

Hey Will,
I'm with you. I would really like to be able to make some applications with GE. I'm especially interested in database applications for PPC. GE is so powerful, yet easy that I'm hoping someday to see it become a complete development platform! :lol:

Keep us posted on your progress...
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest