''' Message Textcek = {["Sunday"] = 1, ["Monday"] = 2, ["Tuesday"] = 3, ["Wednesday"] = 4, ["Thursday"] = 5, ["Friday"] = 6, ["Saturday"] = 7} for k,v in pairs(cek) do io.open("/sdcard/1.txt","w"):write(k) end ''' how to fix ? i try but only write one output: Sunday
''' Message Textcek = {["Sunday"] = 1, ["Monday"] = 2, ["Tuesday"] = 3, ["Wednesday"] = 4, ["Thursday"] = 5, ["Friday"] = 6, ["Saturday"] = 7} for k,v in pairs(cek) do io.open("/sdcard/1.txt","w"):write(k) end ''' how to fix ? i try but only write one output: Sunday
1. Here different open methods: "w", "r", "a", "w+", "a+", "wb", "ab+" etc, all are different. Read about it. 2. File is the byte stream, that should be open, read/writed and C L O S E D. Read about bufferization and flush.
1. Here different open methods: "w", "r", "a", "w+", "a+", "wb", "ab+" etc, all are different. Read about it. 2. File is the byte stream, that should be open, read/writed and C L O S E D. Read about bufferization and flush.