|
| 13 Sep 2017 07:27 PM |
I know how to insert a regular value into a table, but what happens when you want to put in something like:
local Paired Input Output = { [Output] = Input }
Would it be like? :
table.insert(PairedInputOutput,[Output] = Input)
|
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 13 Sep 2017 07:28 PM |
local Dictionary = {}
Dictionary["RandomIndex"] = "NewValue"
Basically, you index a nil spot and that automatically gets added in
Need Help With scripting or Hire Scripters? Go here! via Discord : discord.gg/rfnudw6 |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2017 07:31 PM |
hold up is there a way to reference an actual variable through that method?
What im trying to do is get two values that are connected so that when one changes, the other one can be referenced and changed too. Logic gate input output connections. |
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 13 Sep 2017 07:35 PM |
| I don't know what that means, reword it |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2017 07:40 PM |
1. Switch
2. Gate
Switch turned on, output value = True
Gate references output value from switch, input value of gate = True
Switch turned off, output value = False
Gate references output value from switch, input value of gate = False |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2017 07:45 PM |
I mean referencing a variable in a way that I can look at the table. Use for i,v in pairs and take every output, find its input, and make them match values.
I can't use the location or the name of the input output values because there is more than one part with the same name, so im trying to reference the object itself. |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2017 09:38 AM |
local Table = {}
table.insert(Table, 2) |
|
|
| Report Abuse |
|
|