Advertisement
Jaden11

MetaTable Script

Dec 6th, 2014
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. local metatable = {
  2. _unm = function (t) do
  3. egated[key] = -value -- negate all of the values in this table
  4. end
  5. return negated -- return the table
  6. end
  7. }
  8.  
  9. local table1 = setmetatable({10, 11, 12}, metatable)
  10. print(table.concat(-table1, "; ")) --> -10; -11; -12
  11. end
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement