I was trying to put a nested if in algorithm area like this:
\If{$isContentMethod(\mathcal{M})$}{
$URI \leftarrow getURI(SubCG, \mathcal{M})$\;
\If($URI \in \mathcal{P}_c$){
$Permission \leftarrow getPermission(URI, \mathcal{P}_c)$\;
$\mathcal{B}.add(Permission, URI, Entrypoints)$ \;
}
}
But LaTeX keep giving me errors:
! Argument of \algocf@Ifmain has an extra }.
<inserted text>
\par
l.69 }
I've run across a `}' that doesn't seem to match anything.

\documentclass{...},\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.