lua-users home
lua-l archive

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


Hello,

I'm not sure if I understand your problem. But often Lua bombs out due to an invalid stack position access.

Maybe you forgot to pop something from the stack or to push something on it?

Hope that helps ...
Eva

BetGear - Glen wrote:
Hello,

I’m very new to lua , but I have ran into a problem and I’m not sure whether it’s a bug or I’m missing the point.

I’ve integrated lua (latest version) into one of our c++ projects. The lua script is used to set up dialog boxes for our application. I’m having issues with parsing the table when using a mixture of key and default keys, ie

Dropdown1={xpos = 10, ypos=10, width=20, drop=100, “line1”, “line2”, “line3”}

I’m using the standard c table parsing code that is described in the lua manual. The issue appear to be when lua_next comes to parse the “line2” data, “line1” is parsed correctly, with the key set to 1 as is expected, but the next iteration causes lua to bomb out. Tracing into lua reveal an invalid key error. Surely the line1,line2 and line3 lines will be issued with the standard 1,2,3 key references.

Is this a bug? Is there a known workaround, or am I overlooking something silly?

Any help would be most appreciated.

Glen.