Help with simple code
Posted: Fri Dec 24, 2010 7:37 am
I seem to be failing at making a very simple piece of code work. It seems that it just causes the bot to hang, but I don't know enough to know what I'm doing wrong as I'm operating by example.
Code: Select all
filename = getExecutionPath() .. "/logs/" .. io.stdin:read() .. ".txt";
toFileLine ="Harvested: %s, %d \n", arg1.X, arg1.Z;
file, err = io.open(filename, "w");
file:write(toFileLine);
file:close();