HTOTM: FUSION
No. echo() will print out strings in the toribash window. it was just an example. If you want to store "foo" into Variable just write
Variable = "foo"
into the text file. If you put
dofile("yourTextFile.txt")
into your script file, "foo" will be stored into Variable.

This:
out = io.open("yourTextFile.txt", "w")
out:write("Variable = \"bar\"")
will store the Variable but remember that all other values will be lost. You could use
out = io.open("yourTextFile.txt", "a")
out:write("Variable = \"bar\"")
to "overwrite" the value. In fact it will just put ' Variable = "bar" ' at the end of the file, leaving all other data. After a while you will have a monster text file though.

btw: Usually variables start with small letters. It's not necessary but it makes it easier to read the code.
Last edited by psycore; Oct 29, 2011 at 08:22 PM.
Signature temporarily out of order.