Create .TXT file

Create .TXT file

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
daryl
Posts: 190
Joined: 08 Oct 2006, 10:33

Create .TXT file

Post 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?
0 x

User avatar
Beherith
Moderator
Posts: 4958
Joined: 26 Oct 2007, 16:21

Re: Create .TXT file

Post by Beherith »

Use standard Lua IO library.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10312
Joined: 24 Jan 2006, 21:12

Re: Create .TXT file

Post by PicassoCT »

0 x

User avatar
daryl
Posts: 190
Joined: 08 Oct 2006, 10:33

Re: Create .TXT file

Post 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)
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10312
Joined: 24 Jan 2006, 21:12

Re: Create .TXT file

Post 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.
0 x

gajop
Moderator
Posts: 3030
Joined: 05 Aug 2009, 20:42

Re: Create .TXT file

Post by gajop »

just remember VFS doesn't share the same tree as the lua IO (which maps to the file system)
0 x

Post Reply

Return to “Lua Scripts”

cron