Puzzling math error...

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
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
 
Going to guess corrupt little bit there. I would say just copy the code, delete the file, and recreate it.
 
Back
Top Bottom