I was in Barcelona for 5 days and never once ran into issues,day or night, though many have. Before I went I spent some time reading this:
Kovaks Street Scam Forums • View forum - Barcelona Scams
In my 20 years of world travel I can happily say I have never been scammed, or robbed and alway let anyone approaching me I have no patience for them. (one close encounter in Rio but thats it)
The street scams in Barcelona are legendary so just be smart and enjoy!