62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
|
| 03 Feb 2016 12:33 PM |
| Trigger when a value of a table is removed? |
|
|
| Report Abuse |
|
|
Locard
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 3516 |
|
|
| 03 Feb 2016 12:40 PM |
No, but you can do the same thing by making a pseudo-table and attaching a metatable to that.
local myTable = {first = true} local m = {} m.__index = myTable m.__newindex = function(t,i,v)
if v == nil then --property is trying to turn nil end
setmetatable({},m) |
|
|
| Report Abuse |
|
|
Locard
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 3516 |
|
|
| 03 Feb 2016 12:41 PM |
Woops, forgot a few things:
local newTable = setmetatable({},m)
newTable.first = nil |
|
|
| Report Abuse |
|
|
62GB
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 4157 |
|
| |
|