This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Xemiru's profile picture

Advanced Variables

Started by Xemiru, 23 June 2012 - 06:41 AM
Xemiru #1
Posted 23 June 2012 - 08:41 AM
For some of you, this might not be advanced.
But for me, it is. I'm asking about being able to add a variable via code, instead of coding the variable itself manually.
I'm looking through the LUA docs right now, but no avail.
Xemiru #2
Posted 23 June 2012 - 09:35 AM
Solved.

Nevermind, I found something that I can use for this.
kazagistar #3
Posted 23 June 2012 - 08:30 PM
At the simple level, you can use numbered tables.

If you mean actually new variable types, the best you can do is metatables, but they still function as tables at some level.