Advertisement
fatboychummy

bitHelperThinger

Nov 23rd, 2018
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. local funcs = {}
  2. local met = {}
  3. local ind = {}
  4. local name = "repBit"
  5.  
  6. local function er(func,inp,code)
  7.   printError(name .. ":" .. tostring(func) .. ":" .. tostring(inp))
  8.   if code then
  9.     return "Exited with code " .. tostring(code)
  10.   else
  11.     return "Exited without code."
  12.   end
  13. end
  14.  
  15.  
  16. met.__add = function(lhs,rhs)
  17.   return lhs
  18. end
  19.  
  20. met.__sub = function(lhs,rhs)
  21.   return lhs
  22. end
  23.  
  24. met.__div = function(lhs,rhs)
  25.   return lhs
  26. end
  27.  
  28. met.__mul = function(lhs,rhs)
  29.   return lhs
  30. end
  31.  
  32. funcs.new = function(tab)
  33.   tab = tab or {
  34.     false,false,false,false, false,false,false,false,
  35.     false,false,false,false, false,false,false,false,
  36.     false,false,false,false, false,false,false,false,
  37.     false,false,false,false, false,false,false,false
  38.   }
  39.   for i = 1,32 do
  40.     assert(type(tab[i]) == "boolean",er("new","table does not match specifications.",1))
  41.   end
  42.   setmetatable(tab,met)
  43.  
  44.   return tab
  45. end
  46.  
  47. funcs.band = function(lhs,rhs)
  48.  
  49. end
  50.  
  51.  
  52.  
  53.  
  54. return funcs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement