Community Forum

Field state

Forum Overview >> Scripting

Created27.09.2019 03:58

LinuTuris 27.09.2019 03:58
Dear Users,
I would like to program a script which writes me the status of the fields in an XML file. Is it possible to run this script on an FS server and then have the XML file created on the server? Can I start this script at a certain interval?

Thank you for your answer.

Bilbo Beutlin (BBeutlin) 27.09.2019 20:45
Yes, it is possible. However I don't know whether you can do. *g*
A certain knowledge and experience in FS LUA scripting is required.

In the initializing code you determine server/client and execute following code only if running on server.
For the timing you can either use the update() function with a 'countdown' or (more elegant) a system timer.
The XML file you create with the usual XML functions createXMLFile(), setXML..(), saveXMLFile() and delete() for cleanup.

You'll find code examples for all the stuff in Documentation - LUADOC.

LinuTuris 29.09.2019 18:03
Thank you for your answer.

Zeb Farmington (ZZ_Farmington) 12.11.2019 10:36
there was a mod that did this called fieldstatus if that's what you mean I have just done a quick search and found it for fs15

but im sure you will find it for other versions I know it was in FS13

Note: Log in to post. Create a new account here.