Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, Ayumi, NewbieZorro), 13,972 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Save string to txt file #401578
05/21/12 20:49
05/21/12 20:49
Joined: Feb 2006
Posts: 33
Herts, UK
D
danohu Offline OP
Newbie
danohu  Offline OP
Newbie
D

Joined: Feb 2006
Posts: 33
Herts, UK
I want to use 'inkey' to type a string to the screen and more importantly then save it to a txt file. This is explained in AUM 74 using a booker database as an illustration.

I wondered if there is another AUM (I haven't found one but may have missed it that will also help explain this concept). When saving to a txt file AUM 74 gets into structs and pstring which I want to avoid. Is there a simpler way of achieving the same result e.g.

function input_clicked()
{
if(mouse_pos.y > 267) && (mouse_pos.y < 284)
{
str_copy(author_str " ");
set(author_txt, VISIBLE);
inkey(author_str);

//at this point I want to save what I have put in the string to a .txt file e.g.

function save_data()
{
filehandle = file_open_write("database.txt");

//at this point in AUM 74 one now goes into pstring. Is there a simply way to save the author string to .txt without using pstring and structs. Is there perhaps another AUM or tutorial that might help with this that I have overlooked?

Thanks for your help.

Re: Save string to txt file [Re: danohu] #401583
05/21/12 21:22
05/21/12 21:22
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1