I've noticed that exported variables going into a .txt file turn to strings. Even if they are number values, or boolean values, once exported and re-imported, they are turned into string literals.

How can I stop this from happening?

I use fscommand ("save", "var.txt") to export
and loadVariables ("var.txt", "") to import

thnx.