You could also try calling os.getenv(varname) and then print the value to a prompt.
Sounds interesting, still very new with Lua myself! Interesting to see if it is that simple! If it works let me know! More detailed answers could be given by TGC I imagine. I am by no means a Lua expert as I have stated before. Just repeating advice I was given to get things working. I noticed the documentation for Lua scripting has not changed at all since the update, despite many new commands and as talked about here, changes to how things seem to work in general. I'm sure if it were a simple directory problem I would have been told when I asked about this, but possibly not of course, just the simplest way to rectify it. More official info is needed!
I do know that in prior versions of Reloaded globals never reset when tested more than once. Perhaps this is part of a rewrite in this area? I know it was not a simple fix from a mail off Lee. I can be tenacious when I notice obvious bugs
I'm fairly sure TGC are rewriting the Lua>DB system completely because of the limitations of the prior software.
I'm not saying require isn't needed, but at the moment it seems to be unsupported. Unless you prove me wrong of course! When I try making scripts that require global variables or arrays I'm sure I'll find if it doesn't work from one main script!
SPECS: Q6600 CPU. Nvidia 260GTX. 8 Gig Memory. Win 7.