lua-users home
lua-l archive

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

Daniel Krenn wrote:
> If we want to make a call like
> GetValue("character.startPositions.pos1.x", 0), does this mean we have
> to iterate through the key and break it into sub-keys before we get
> down to the value??? Maybe I'm missing something - I haven't used LUA
> a lot, so this is quite likely :)

If you don't mind a little CPU churning, something like the following is nice and simple.  Just
prefix the value you want to retrieve with "return ":

    lua_dostring(L, "return character.startPositions.pos1.x")