[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re[2]: Using LUA for Configuration Files
- From: "John Belmonte" <jvb@...>
- Date: Mon, 5 Feb 2001 13:59:23 +0900
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")
-John