Topic: help : io.open can't find file
I want to use lua to open a text file and read the lines
my code goes like this
file = assert(io.open("textfile.txt", "r"))
for line in file:lines() do
print(line)
end
file:close()
yet I got following error
[string "function split(pString, pPattern)..."]:42: textfile.txt: No such file or
directory
I try to put textfile.txt in any logical directory but it can't find it. Where should it be?
I'm on Linux/Ubuntu btw
Thanks