Hello,
Im working on a program thats reading a LUA script file with a bunch of
arrays and then gets some of the information out of it to my .NET app.. And
its all working great as long as I know the exact name of each key to get
the value in the arrays.
I would like to figure out how I can 'browse' a lua table so that I can see
what it contains since sometimes the keys are dynamic and I don't know
exacly what the entry name is.
For example. To get the value an 'hardcoded' entry called Race I would do:
----------
(.. first I read the script file ..)
Dim Character As LuaInterface.Lu aTable
Character = lua.GetTable("m yProfile.Trollb ane.Character." & TMPPlayerName)
PlayerRace = Character.Item( "Race")
----------
What I want to do is browse the "myProfile.Trol lbane.Character " table to see
what character names it holds.
I've gotten as far as getting the keys count but I can't loop through them
or anything. Hmm
I guess it could be done with some more LUA scripting, can I get it to
return the table entry listning as an array of strings or anything?
I can execute LUA commands through the LuaInterface but I can't figure out
how to make it return what I want to know :)
THE ACTUAL QUESTION:
I guess all I need to know is how to dynamically be able to browse or list
the entries in the LUA array.. do I need to do that through a LUA script or
can I do it on the .NET-side? hmm
Some background..
I am using the LuaInterface DLL's to communicate with the LUA script.
(http://luaforge.net/projects/luainterface/)
VB.NET 2005.