[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Extracting list of items from line?
- From: Gilles Ganault <gilles.ganault@...>
- Date: Mon, 18 Apr 2011 11:52:32 +0200
On Mon, 18 Apr 2011 11:25:44 +0200, steve donovan
<steve.j.donovan@gmail.com> wrote:
>Well, split() is certainly not a standard Lua function - arguably it
>should be, but there's code on the Wiki for it.
That figures: www.lua-users.org/wiki/SplitJoin
To keep things simple, I copied strsplit() into funcs.lua and imported
the script through dofile():
===============
dofile("funcs.lua")
...
execs = io.open("execs.txt","r")
while true do
...
libs = strsplit(",",libs)
===============
However, strsplit() uses strfind() which triggers this error: "attempt
to call global 'strfind' (a nil value)".
Does Lua require some extra step when importing code from external
scripts, eg. namespace issue or something?