First, although it does not appear to be the case here, the line numbers in error messages are often off by 1 or report the last line in the file; watch out for that.
The "pin name expected" is caused by
b=0 because 0 is not a pin name.
You want to use the constants true and false for 1 and 0. True and false are special, in that they match any size bus as well as single wires. You can use things like
if you needed to set those 3 bits to 1.
[Please delete your duplicate post in "User's Forum".]