# Write pseudocode, missing number treated as zero

I've written this pseudocode and I encountered two problems. First, it shows the message: Missing number, treated as zero 4 times; and second, I cant write code inside the loops. Even if I write the endloop outside of the condition it goes before it. Can someone help me?

\documentclass[11pt,a4paper,fleqn]{epm-bs}

\usepackage{indentfirst}
\usepackage{chicago}
%\usepackage{kmath,kerkis}
\usepackage[greek,english]{babel}
\usepackage[iso-8859-7]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{url}
\usepackage{amssymb,amsfonts,amsmath}
\usepackage{float}
\usepackage{algorithm,algpseudocode}
\usepackage{pgfplots}
\usepackage{optidef}
\usepackage{nccmath}
\overfullrule=0pt

\textlatin{
\begin{algorithm}
\caption{\greektext{Αλγόριθμος} \textlatin{Dantzig Wolfe}}
\label{pseudocode}
\footnotesize \begin{algorithmic}[1]
\Procedure{Dantzig Wolfe}{}
\Statex \emph{\greektext{Βήμα 0 (Αρχικοποίηση)}}
\Statex \emph{\greektext{Επίλεξε κατάλληλα σύνολα μεταβλητών}}\\
\While {true}
\Statex \emph{\greektext{\{Κυρίαρχο πρόβλημα\}}}
\Statex \emph{\greektext{Λύσε το κύριο περιορισμένο πρόβλημα}}
\State Compute duals of coupling constraints $\ \pi_1$
\State Compute duals of $\ k^{th}$ convexity constraint $\ \pi^{(k)}_2$
\Statex \emph{\greektext{\{Υποπρόβλημα\}}}\\
\For {k=1,. . . ,K}
\State Plug $\ \pi_1$ and$\ \pi^{(k)}_2$ into sub-problem k
\State Solve sub-problem k\\
\If {$\ \sigma^*_k<0$}
\State Add proposal $\ x^*_k$ to the restricted master
\EndIf
\EndFor
\If {No proposals generated}
\State STOP. The problem is optimal.
\EndIf
\EndWhile
\EndProcedure
\end{algorithmic}
\end{algorithm}
}

• please most the complete error message you get. – Timothy Truckle Jan 13 at 11:59
• pdflatex> !Missing number,treated as zero. It shows this 4 times at the output and it redirects me to the closing bracket of the pseudocode. – Μαρια Αγγελιδου Jan 13 at 12:02
• I replaced your documentclass {epm-bs} with {article}, downloaded the optidef package, and enclosed the main algo within a \begin{document} ... \end{document} to get a valid pdf output. Don't know what's the issue with your compilation. However, my greeks all appear ; for some obscure reason-- though that's perhaps not your issue. – Partha D. Jan 14 at 14:27
• Thank you, perhaps youre ritght. – Μαρια Αγγελιδου Jan 15 at 12:22