Well, it would probably help is you ever assigned
Error
to something other than
false
...
These are every time you reference the variable:
Error: boolean; { True/False- false until there is an error }
Error := false;
Error := false;
Error := false
result := not Error;
So result will always be true.