Page 1 of 1

Create .TXT file

Posted: 10 Dec 2012, 10:12
by daryl
Hi all,
i'm working on a mission using mission editor.

I would need to know if is possible to create a .txt file ( for example "endmission1.txt" ) by using LUA language.

And I need to compile this .txt file by adding some string such for example:
mission1_obj1 = completed;
and in a second moment i would add new string in this .txt file, for example:
mission1_obj2 = failed;
etc.

is this possible?

can you help me with programming?

Re: Create .TXT file

Posted: 10 Dec 2012, 10:15
by Beherith
Use standard Lua IO library.

Re: Create .TXT file

Posted: 10 Dec 2012, 10:18
by PicassoCT

Re: Create .TXT file

Posted: 10 Dec 2012, 10:22
by daryl

ok... i don't know lua :(
so now i will try to study this documentation, so if I will have problems i will post here :wink:

thx all!! 8)

Re: Create .TXT file

Posted: 10 Dec 2012, 10:26
by PicassoCT
sorry, i know beeing bombed with tutorial links and told to lua it isnt quite nice and helpfull as people (who mostly learned that stuff either in lectures, or via friends) think it is for a beginner.

If you have questions regarding lua, join the moddev-channel in irc.
Ill gladly answer questions ( i know the answers to) there.

Re: Create .TXT file

Posted: 10 Dec 2012, 11:08
by gajop
just remember VFS doesn't share the same tree as the lua IO (which maps to the file system)