lua-users home
lua-l archive

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


I'm trying to run script described in table like this:

p1=1
p2=2

function action1(p)
:
end

script={
{action= action1, arglist={p1}},
{action= action2, arglist={p2}},
..
}

using code like this:

for ....
    call(script[i].action,  script[i].arglist)
end

Now,  I'd like to change values of arguments (p1, p2...)  at run time,
from within an action. Unfortunately,  this has no effect on arguments
passed
to actions since script table is already built with initial values of
arguments.

Is there any workaround for such thing?  Do I need something like
pointers
or what?

Thanks in advance.

Zele