# Undefined control sequence argument [closed]

\begin{algorithm}
\SetKwData{Candidates}{candidates}
\SetKwData{Visited}{visited}
\SetKwData{URL}{URL}
\SetKwData{TraversalDepth}{traversalDepth}
\SetKwFunction{RetrieveByTraversal}{retrieveByTraversal}
\SetKwInOut{Input}{input}
\SetKwInOut{Output}{output}
\Input{Starting page URL, Traversal parameter traversalDepth, Set of visited pages Visited, Already retrieved pages Candidates}
\Output{School list page candidates}
\BlankLine
\Candidates $= \emptyset$\;
\Visited $= \emptyset$\;
\Candidates = \Candidates $\cup$ \URL\;
\Visited = \Visited $\cup$ \Links\;
\ForEach{link $link$ in \Links} {
%\RetrieveByTraversal($link$, \TraversalDepth-1, \Visisted, \Candidates)\;
}
return \Candidates\;
\caption{Retrieving School List Page Candidates Using Traversal}
\label{algo_traversal_s}
\end{algorithm}


I got an undefined control sequence argument error at the commented-out line. When it is commented out, everything works fine. I'm not able to figure out what's wrong with that line.

Edit: as requested, I'm posting a minimum working example and the corresponding error message.

\documentclass[12pt,letterpaper]{report}

\usepackage{array}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{subfigure}
\usepackage{amsmath}
\usepackage[indent,bf]{caption}
\usepackage{rotating}
\usepackage{setspace}
\usepackage{longtable}
\usepackage{rotating}
\usepackage[algochapter,linesnumbered,noend,ruled,oldcommands]{algorithm2e}
\usepackage{url}
\usepackage{float}
\usepackage{bookmark}

\begin{document}

\begin{algorithm}
\SetKwData{Candidates}{candidates}
\SetKwData{Visited}{visited}
\SetKwData{URL}{URL}
\SetKwData{TraversalDepth}{traversalDepth}
\SetKwFunction{Union}{Union}
\SetKwFunction{RetrieveByTraversal}{retrieveByTraversal}
\SetKwInOut{Input}{input}
\SetKwInOut{Output}{output}
\Input{Starting page URL, Traversal parameter traversalDepth, Set of visited pages Visited, Already retrieved pages Candidates}
\Output{School list page candidates}
\BlankLine
\Candidates $= \emptyset$\;
\Visited $= \emptyset$\;
\Candidates = \Candidates $\cup$ \URL\;
\Visited = \Visited $\cup$ \Links\;
\ForEach{link $link$ in \Links} {
\RetrieveByTraversal($link$, \TraversalDepth-1, \Visisted, \Candidates)\;
}
return \Candidates\;
\caption{Retrieving School List Page Candidates Using Traversal}
\label{algo_traversal_s}
\end{algorithm}

\end{document}


The corresponding error message is as follows:

! Undefined control sequence.
<argument> ...ink\$, \TraversalDepth -1, \Visisted
, \Candidates )\;
l.45 }

?

-

## closed as off-topic by egreg, Claudio Fiandrino, Qrrbrbirlbel, Heiko Oberdiek, karlkoellerAug 29 '13 at 10:27

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. — Class? Package? Algorithms? The error message also tells you which macro was found undefined (the last one on the line). –  Qrrbrbirlbel Aug 29 '13 at 9:07
I think you made a type: Visisted instead of visited. with two time s... –  CommuSoft Aug 29 '13 at 9:23
The code is still far from minimal; you load way too many packages! –  Svend Tveskæg Aug 29 '13 at 9:26
This question appears to be off-topic because it is about a simple typing mistake –  egreg Aug 29 '13 at 9:48

It should be \Visited instead of \Visisted