Hi!
Thx for the replies. I build for iOS.
It concerns multilanguage word files, which I would like to put in a folder “luaLocales”.
_G.wordlist is determined by the language preference of the user.
So if I set
\_G.wordlist = "luaLocales.wordlist\_NL.txt"
I get an error “attempt to index global ‘luaLocales’ (a nil value)”
Same with “luaLocales/wordlist_NL.txt”.
function buildDictionary()
local path = system.pathForFile(\_G.wordList)
local file = io.open( path, "r")
if file then
for line in file:lines() do
dictTable[line] = true
end
io.close(file)
end
end
It works fine when not putting the txt files in a folder. [import]uid: 148841 topic_id: 34832 reply_id: 138781[/import]