Jump to content
  • Advertisement
Sign in to follow this  
Josh Klint

Lua table identifier

This topic is 2694 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am writing a Lua debugger that displays all variables, and the contents of all tables. One problem is that tables can reference other tables, and easily create infinite loops. In fact, the default Lua state with libraries loaded does exactly this.

Is there any way to get a unique id for each table, so that I know if a table has already been analyzed? It would make things much easier for me. Right now, I am trying to dynamically query tables over the network as the user opens treeview nodes, but I am getting a random memory error, and it feels really shaky.

[attachment=2151:Image2.png]

Share this post


Link to post
Share on other sites
Advertisement
Thanks, I think I will just have a set depth level it drills down to, like 3 or 4 levels. It's unlikely the user will need to drill down 20 recursive levels of tables.

Share this post


Link to post
Share on other sites
Why not use one of the existing Lua debuggers? Decoda is the most well known one, though it's not free. I think it's only $50 for an indie license, however, and I'm sure writing one yourself would take at least $50 of your time. There are free ones as well.

If you're writing it for the sake of writing it, then go for it, good luck :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!