Topic on Project:Support desk

Lua error: Line 264: attempt to perform arithmetic on local 'a' (a table value).

2
79brue (talkcontribs)

I used lua module to make bitwise operators. But it seems to have an error. What should be the error?

Template: <includeonly><onlyinclude>{{#invoke:Bitwise|band|a = {{{1|1}}}|b = {{{2|1}}}}}</onlyinclude></includeonly>

Line 264 of module: function M.band(a,b) return ((a+b) - bxor(a,b))/2 end

return statement: return M

Ciencia Al Poder (talkcontribs)

Looks like "a" is a table, and you can't perform a sum of a table.

Reply to "Lua error: Line 264: attempt to perform arithmetic on local 'a' (a table value)."