I'm trying to use \csname to execute a command whose name depends on a variable. If I use \csname mygametitle\tmp \endcsname it works, but if I use instead of \tmp the argument #1 it fails:
\documentclass{article}
\begin{document}
\def\mygametitleABC{Title for ABC}
\def\test#1{%
\csname mygametitle#1 \endcsname%
}
\def\testb#1{%
{%
\def\tmp{#1}%
\csname mygametitle\tmp \endcsname%
}%
}
Version 1:
\test{ABC}
Version 2:
\testb{ABC}
\end{document}
