[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: 4.1 work3 lua_getGlobal
- From: "Russell Y. Webb" <rw20@...>
- Date: Sat, 19 Jan 2002 20:26:49 -0800
I'm a bit puzzled. I have a global table called 'name' defined with
name = {}
The following C code never executes the code inside the condition
lua_getglobal(lua, "name");
if(lua_istable(lua, 1)){
// this code never executes
}
while the following lua code works fine
if type(name) == 'table' then
// this code does run
end
Obviously I'm doing something wrong in the C version but I can't see what it
is. It's likely to be the 1 in lua_istable, but why?
Haven't tried this with 4.0 yet.
Russ