Saving inputtext into a simple text file
#1

Hello there,

I was wondering how to use File Functions to save inputtext into a text file. What I am trying to do is OnDialogResponse, when the player puts his text into an Input type dialog, the information will get submitted into a text file, creating a new line for each new input. I did some research and I found it's possible, but I'm not sure how to code it, I looked upon file functions and tried something like this:

Код:
	if(dialogid == REQUEST && response)
	{
 		new File:pos=fopen("/RadioRequests.txt", io_write);
        fwrite(pos, inputtext);
        fclose(pos);
			}
There's no errors, so I figured out it can't be a brackets issue or anything, it must be that useless format I made. Please could I have some sort of example or correction on how to do that?

Regards,
HighFlyer
Reply


Messages In This Thread
Saving inputtext into a simple text file - by [SAP]HighFlyer - 01.07.2011, 11:06
Re: Saving inputtext into a simple text file - by Sascha - 01.07.2011, 11:11
Re: Saving inputtext into a simple text file - by Lorenc_ - 01.07.2011, 11:13
Re: Saving inputtext into a simple text file - by BigETI - 01.07.2011, 11:30

Forum Jump:


Users browsing this thread: 1 Guest(s)