|
| 18 Jul 2017 12:12 AM |
drinks[1] = slush[1] sizes[1] = slush[2]
/sarcasm | i am a dead meme |
|
|
| Report Abuse |
|
|
PLBH
|
  |
| Joined: 08 May 2014 |
| Total Posts: 151 |
|
|
| 18 Jul 2017 12:15 AM |
| No use tables Drinks = {} and so on |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2017 11:22 AM |
but i also want to save it to another table so that i can clear the tables later
/sarcasm | i am a dead meme |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 18 Jul 2017 11:25 AM |
To clear this table below, local Table = {'Nemo', 'Dory'} To clear it just do this, Table = {}
|
|
|
| Report Abuse |
|
|
qrushed
|
  |
| Joined: 10 Apr 2012 |
| Total Posts: 587 |
|
| |
|
DevJoas
|
  |
| Joined: 17 Dec 2014 |
| Total Posts: 627 |
|
|
| 18 Jul 2017 11:27 AM |
This would work, but be care full when putting a table inside of a table when using this method because the tables will be saved as pointers:
> local tab = {"1", "2"} local tab2 = {}
tab2[1] = tab -- THIS WILL BE A POINTER, NOT A COPY OF THE TABLE
print(tab2[1][1])
tab2[1][1] = "3" -- THIS EDITS ORIGINAL TABLE
print(tab[1]) print(tab2[1][1]) -- BOTH values are now 3
1 3 3
|
|
|
| Report Abuse |
|
|
|
| 18 Jul 2017 11:37 AM |
thanks!
/sarcasm | i am a dead meme |
|
|
| Report Abuse |
|
|