lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,
       I am still in the early stages of learning Lua.
I am using Lua 3.2. I have this problem, i can read from
a file , but cannot write to it.

-- et contains "happy"

k = openfile("et","r")
print(k)
m= read(k,"*l")
print(m)

 it works fine

but this does not ?

k = openfile("etc","w")
print(k)
m= write(k,"happy")
print(m)

though a new file is created it has nothing

and userdata:0 is returned from write.


Thanks
Gaurav