Illegal parameter number in definition of \test [closed]

My problem is to get the following onto a frame of a presentation using beamer class. I get the following error message:

Illegal parameter number in definition of \test. 1 l.257 \end{tikzpicture}

What can I do? Here is the code:

\begin{textblock}{0.2}(0.7,13)
\begin{tikzpicture}[scale=5.3,cap=round,>=latex]

\begin{scope}[
-{Stealth[round, length=8pt, width=8pt, bend]},
shorten >=4pt,
very thin,
]
\end{scope}

% draw the two points
(-40:\Radius) circle[] node[below right] {$x$}
(-60:\Radius) circle[] node[below right] {$y$}
;

\def\Item#1#2(#3:#4){%
\path[
decoration={
text along path,
text={#1},
text align=center,
},
decorate,
]
;
}
\Item R 2pt (180:-40)
\Item E 1pt (180:300)

\node[draw,circle] at (-0.4,0.6)(a) {1};
\node[draw,circle] at (0.65,0.6)(b) {2};

\end{tikzpicture}
\end{textblock}


closed as unclear what you're asking by user36296, Zarko, Mensch, Stefan Pinnow, Heiko OberdiekNov 12 '16 at 17:11

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Normally, this occurs when you do things like this: \def\com#1{#1 + #2}. But I can't spot a mistake like this. – MaestroGlanz Nov 11 '16 at 16:18
• Have you tried with a [fragile] frame? Otherwise please post all the necessary packages and libraries to run your code. – user36296 Nov 11 '16 at 16:28
• or move the definition outside the frame – percusse Nov 11 '16 at 18:11
• The [fragile] should be added to \begin{frame} if you have that somewhere in the code. – Albert Jul 11 '18 at 23:05
• Another solution would be to use \lstinputlisting and put the code into an external file. – Albert Jul 11 '18 at 23:23