[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Parameters with Upvalue?
- From: Todd Lipcon <tlipcon@...>
- Date: Sun, 21 Jan 2001 18:13:00 -0500 (EST)
Hi all,
I'm very new to Lua and evaluating it for use as the server-side
scripting language for a massively multiplayer online role-playing game
(MMOLRPG). It seems to be fast and expandable, which are the two main
requirements I have. I have been trying to write functions to implement
namespaces by overriding setglobal and getglobal. I'm trying to implement
namespaces by sticking everything into a global table of that name. I'm
using pushcclosure with this table on the stack and a count of 1 for this.
For some reason, in my getglobal replacement, the stack has:
1: the string of the name of the variable
2: nil!?
3: the upvalue table.
What I am wondering is why in the world this "nil" value is appearing on
the stack in between the single parameter to getglobal and the upvalue. As
far as I can tell, getglobal only has one parameter and one result. Is the
"nil" a placeholder for my result?
Thanks,
-Todd
--
"It's not that easy being green;
Having to spend each day the color of the leaves.
When I think it could be nicer being red, or yellow or gold...
or something much more colorful like that." -Kermit the Frog