# pdf/Tikz Undefined Control Sequence

I am drawing a Picture using TikZ with two \draw commands.
The first one works but on the second LaTeX claims

! Undefined control sequence. l.44 \draw (0,2) -- (-.5,2);


What can I do to fix that...
Thanks in the preface

EDIT: MWE

\begin{figure}[htbp]
\centering
\begin{tikz}
% First the house
\draw [thick,color=gray] (0,0) -- (0,2) -- (1,3) -- (2,2) -- (2,0) -- cycle (0,2) -- (2,2);
% This command doesnt work...
\draw (0,1) -- (-.5,1);
\end{tikz}
\end{figure}

• The previos TikZ command is ended correctly with an ';' – Peter Parker Jan 2 '14 at 13:16
• Welcome to tex.se! Please provide an MWE – papabravo Jan 2 '14 at 13:21
• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \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. – jub0bs Jan 2 '14 at 13:30
• The tikz package defines a \tikz macro, but no tikz environment. Did you mean \begin{tikzpicture} ... \end{tikzpicture}? – jub0bs Jan 2 '14 at 13:31
• The first command did work because \begin{tikz} is issuing a \tikz comand and this grabbed the first \draw. – Ulrike Fischer Jan 2 '14 at 13:55

\begin{tikzpicture}

• Thank you but the mistake was using a tikz environment rather than an tikzpicture environment... – Peter Parker Jan 2 '14 at 17:00