Reply To: building text strings

Home Forums General Programming building text strings Reply To: building text strings

#72213
human fly
Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    another suggestion from that page:

    dumpoutput = function()
        local file = io.write([path to file dump here], "w+")
        for i, line in ipairs ([console output function]) do
            file:write("\n"..line);
        end
    end

    but i don’t know if that is valid for Ctrlr, and i don’t know
    what ‘w+’ is.

    https://stackoverflow.com/questions/21592031/in-lua-how-to-print-the-console-output-into-a-file-piping-instead-of-using-th

    he also says this:
    “Note that the console output function has to store the output of the console in a table. To clear the console at the end, just do os.execute( "cls" ).”

    edit: ah, ‘w+’ >
    https://www.tutorialspoint.com/lua/lua_file_io.htm

    we-eee-ee, frying my brain early in the morning..

    Ctrlr