Thalassicus
Bytes and Nibblers
What's wrong with this code? It says there's an unexpected symbol on the line of bw= ...
Code:
function GetTruthTableResult(inputs, truthTable)
local bw = 0
for k,v in inputs do
if v then
bw = bw | 2^(k-1)
end
end
return truthTable[bw]
end