# Format code listing package

I am documenting a script which has almost 43+ keywords. The output I want is something on the below lines...

and the latex code I have is

\documentclass[a4paper, onesided]{article}
\usepackage{listings}

\lstdefinestyle{customc}
{%
basicstyle=\small\ttfamily,
keywordstyle=\color{blue},
stringstyle=\color{red!40!black},
columns=fullflexible
}%

\lstdefinelanguage{InnoScript}{%
keywords={AllowCancelDuringInstall, WindowVisible, RestartIfNeededByRun, Name, MessagesFile, Source, DestDir, Flags, Languages, Parameters, Filename, WorkingDir},
sensitive=true,
comment=[l]{;},
string=[b]'
}%
\begin{document}
\lstset{style=customc}
\lstinputlisting[language=InnoScript, firstline=39, lastline=51]{<WindowsLocation>Script.iss}
\end{document}


The errors I receive is:

Where am I wrong?

EDIT

@Daniel, came to rescue. Now, the question arises. How do I fix the overfull box warning? :-D

• Load one of the available color packages (e.g., \usepackage{xcolor}), which define the \color command. Jan 14 '16 at 10:59
• And, by the way: Welcome to tex.se :-) Jan 14 '16 at 11:00
• What the...? Someone willing to blind me in one eye? I have been kicking myself inside out!!!Thank you so much @Daniel. Jan 14 '16 at 11:02
• About the overfull box, breaklines=true added to the 'lstdefinestyle? Jan 14 '16 at 11:39
• Geez. Another foot-in-mouth moment... @TorbjørnT. thank you so much Jan 14 '16 at 12:40

Just add the \usepackage{color} line to your preamble, like this:
\documentclass[a4paper]{article}
`