Write to file

Is there a way to write to file without the io module, or is there a way to import the io module?

thanks, FaceHunter

You can only write .txt files. Also wrong place, questions about coding go in the Developer discussion sub-forum
EDIT: also please don’t sign your threads, we can see your name.

I only want to write txt, i will remember it for the next time :slight_smile:
EDIT: I’m used to forums where everyone is decently :slight_smile:

[editline]14th July 2013[/editline]

Also, if a mod would be as nice to move this to the right section,


file.Write("mytext.txt", "Text goes in here.")

You should really be using the new wiki.

I just prefer the old one. Better documented and better examples.

Somethings have changed from Garry’s Mod 12 and 13. I prefer now the new one, and it has plenty of documentation.

Yeah they have but I find the majority of stuff still works. I occasionally find the new wiki to be awkward. Sometimes optional arguments aren’t said to be optional and I can be left scratching my head at how/the correct way it’s supposed to be used. The new one isn’t bad by any stretch it’s still really good. I just like the examples the old one provides.