In Computer craft and lua in general there is a way of storing more than one data type in one variable. For example:
local myTable = {}
This declares a table but you can replace "myTable" with any name you want
To be able to store values in a table you need to use an index:
local myTable = {test="lol",num=3}
print(myTable["test"])
print(tonumber(myTable["num"]))
The first line of code is making a table called myTable and adding two variables inside "test" and "num" then the two print commands print out the value of myTable[test]and myTable[num]
To add/read variables from a table you type
myTable[<index name="">] = "value to be stored"
or to receive
print(myTable["index of value to be retrieved "])
That's it for now but more chapters will be coming later click the link to see how to use tables with rednet to send nultiple messages in one ! "http://www.computerc...c/14743-relays/</index>
Examples
Example #1, storing and retrieving passwords
Spoiler
Troubleshooting
I don't understand!
In this case please post bellow the issue you are having and I will try to help you
It's giving me an error!
If this happens do the following:
- *Create a reply to this topic
*In the reply add the code you are using and the error that is being generated












