Page 1 of 1

How to save...

PostPosted: Sun Jun 03, 2007 9:43 am
by regine
How to save texts written with the Text Input function?
And how to load them later?

PostPosted: Mon Jun 04, 2007 2:36 am
by DilloDude
Quite simple. You need to create a text variable in a savegroup. When you want to save the text, use this code:
Code: Select all
strcpy(string, text);//replace string with the name of your variable
saveVars...//fill in the appropriate data

when you want to load it, it's the same thing in reverse:
Code: Select all
loadVars...
strcpy(text, string);

PostPosted: Mon Jun 04, 2007 6:18 am
by regine
It isnt functionally.

PostPosted: Mon Jun 04, 2007 6:42 am
by DilloDude
What is it doing?

PostPosted: Mon Jun 04, 2007 8:54 am
by regine
It saves something, but it doesn't loads it.

Can you make a demo, please?

PostPosted: Mon Jun 04, 2007 11:57 pm
by DilloDude
Here. It saves when you press enter. When inText is created, it loads, if there is saved data.

PostPosted: Tue Jun 05, 2007 11:52 am
by Joshua Worth
Doing string manipulation will be much easier once GE goes C++ style(which could be a long time, nobody knows)