Hi cos00kun,
There are two kind of ways to achieve this.
The simplest way to do this is to use a Lua file ("file.lua") to store the Flight variable as a table :
Flight = {
["modulation"] = 0,
["task"] = "CAP",
["uncontrolled"] = false
...
}
To use this file and get the Flight variable, just use the following code
dofile("file.lua")
But this simple method exposes your program to vulnerabilites, if someone insert Lua code in it.
The second way, more secure, is to use the sys.File object to parse the file.txt and get all the fields, and subfields of the Flight table, but it's rather complex (kind of creating a Lua parser).
You can also create a JSON format table and read it using the sys.COM object (see the json.lua example).
The sys .COM object will read it seamlessly as a table.