# can't get to run chemfig module properly

I did structure formulas with latex before, but now I wanted to reaction mecanisms with electron movement arrows and everything. I used some example code to try and get to know the principles, but it doesn't work. Some commands don't work apparently and the arrows go anywhere but not where I want them to go. This is my file:

\documentclass[a4paper,10pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}
\usepackage{chemmacros}

\begin{document}

\chemsetup[chemformula]{format=\sffamily}
\renewcommand*\printatom[1]{\ensuremath{\mathsf{#1}}}
\setatomsep{2em}
\setdoublesep{.6ex}
\setbondstyle{semithick}

\section{A}

\setatomsep{7mm}
\setchemrel{}{}{5mm}
\chemfig{R-@{dnl}\lewis{26,O}-H}
\chemsign{+}
\chemfig{R-@{atoc}C([6]-OH)=[@{db}]O}
\chemrel[\chemfig{@{atoh}\chemabove{H}{\scriptstyle\oplus}}]{<>}
\chemmove[->,shorten <=2pt]{
\draw[shorten >=2pt](dnl)..controls +(90:1cm)and+(north:1cm)..(atoc);
\draw[shorten >=6pt](db)..controls +(north:5mm)and+(100:1cm)..(atoh);}

\bigskip

\end{document}


the commands "\chemrel", "\chemsign" and "\setchemrel" are errored. Did I miss something?

Yes, you did miss something: \setchemrel etc are deprecated since chemfig features complete schemes (since v1.0 2011/06/15). They have been removed with v1.2 2015/10/08. Just use the \schemestart ... \arrow ... \schemestop:

\documentclass[a4paper,10pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}
\usepackage{chemmacros}

\renewcommand*\printatom[1]{\ensuremath{\mathsf{#1}}}
\setatomsep{2em}
\setdoublesep{.6ex}
\setbondstyle{semithick}

\begin{document}

\section{A}

\schemestart
\chemfig{R-@{dnl}\lewis{26,O}-H}
\+
\chemfig{R-@{atoc}C([6]-OH)=[@{db}]O}
\arrow(.10--){<=>[\chemfig{@{atoh}\chemabove{H}{\scriptstyle\fplus}}]}
\chemfig{R-C([6]-OH)(-[2]\chemabove{O}{\scriptstyle\fplus}(-[4]R)-[0]H)-O-H}
\schemestop

\chemmove[->,shorten <=2pt]{
\draw[shorten >=2pt](dnl)..controls +(90:1cm)and+(north:1cm)..(atoc);
\draw[shorten >=6pt](db)..controls +(north:5mm)and+(100:1cm)..(atoh);
}

\end{document}