Jump to content
The simFlight Network Forums

CSV File String Variable Formatting in a Lua Script


Recommended Posts

Hi Pete,

I can't seem to find how to specify the formatting of string variables for a CSV file using, I assume, the newline \n character. I know how to do it with numerical variables, but am not having any luck with string variables.  For example, using something like

file:write(string.format("%-3s %-6s %-5s ", str_var1, \n str_var2, \n str_var3 \n ))

I want to end up with the value of each string variable on a separate line in the CSV file but can't seem to get the syntax correct.

Thanks for any suggestions,

Al

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.