lua-users home
lua-l archive

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


I think I see what you are saying. Hmmmmm

>From my main calling program (main.lua):

1. How can I initialize a variable that persists
through all called functions 
and modules (via require).

2. That I can change the value of from any called
function or module?


Thanks again guys,

Michael

> 
> Hallo,
> 
> Michael Elliott wrote:
> > 
> > If call the module from a parent script (via
require
> > "myscript.lua") then print the value of the the
> > variables from the parent script they are nil.
> > 
> 
>       Are you using module(...) inside myscript.lua?
If yes, then your 
> "globals" are actually inside the module table.
> 
> Cheers,
> -alex
> 
>