Minor file:write issue...
Posted: Sun Mar 14, 2010 9:21 pm
I made a script that creates my paths for me but i'm having a problem...
The out put of my script is...
What it should do it take away the last "," on desX and desY...
This is what i use to right to my file...
Erm, I just had a thought.. Maybe i should turn the entire desX and desY into one string then pass it through file:write one time... Maybe that would allow /b to work correctly?
Edit: Awe, I thought i might be wrong... I was just hoping it was a problem with file:write and not\b...
I changed my code to this and have nothing good to report...
The out put of my script is...
Code: Select all
desX = { 289,298,1,301,309,1, };
desY = { 322,317,1,320,320,1, };
This is what i use to right to my file...
Code: Select all
file:write("desX = { ");
file:write(listX);
file:write("\b };\ndesY = { ");
file:write(listY);
file:write("\b };");
Edit: Awe, I thought i might be wrong... I was just hoping it was a problem with file:write and not\b...
I changed my code to this and have nothing good to report...
Code: Select all
tmpString = "desX = { " .. listX .. "\b };\n" .. "desY = { " .. listY .. "\b };"
file:write(tmpString);