Total Bases

For figuring total bases, do batters reach on base by error count?

Thanks

Walks don’t count only bases earned while the ball you have just hit is in play. Errors also don’t count. For example a long single where a runner on second draws a throw to the plate and you advance to second on the throw home is just a single and one total base.
Total bases = (singles 1) + (doubles2) + (triples3) + (homers4)