# How to get rid of a 'missing number' error within a custom hyp environment?

I'm working on my thesis and ran into some trouble, I'm still relatively new with latex and this is my first post here so if I messed up the MWE let me know. The problem I'm having is that I want my hypotheses to show up as H#: 'hypothesis text' Where the number is a subscript, and the hypothesis text is indented equally so that it remains to the right of H# even on the second row of a long hypothesis.

I finally managed to get it done, however I keep getting an error. The image below provides an example of the MWE results and its basically just how I would like it to appear. However, I'dd like to get rid of the error I'm getting: 'error: missing number, treated as 0'.

I don't know why I'm getting this error and I've searched for a way to fix it for a long time but got nothing so far. I realize the code might be a bit unorthodox but I don't know how to improve it while still getting it to look the way I want. Any help is much appreciated, thanks in advance.

\documentclass{article}
\usepackage{amsmath}
\usepackage{ntheorem}
\theoremseparator{:}
\theoremindent3\parindent
\newcommand\thehyp{\arabic{hyp}}
\newtheorem*{hyp}{H{$_{\thehyp}$}}

\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{hyp}
This is a test hypothesis, test test test test test test test test stuff test test, this is a fairly long test hypothesis, test test test test test test.
\end{hyp}
\lipsum[1]

\end{document}


The construction \newtheorem* doesn't define a counter, because you're asking for an unnumbered theorem.

Solution: define one yourself.

\documentclass{article}

\usepackage{amsmath}
\usepackage{ntheorem}

\theoremseparator{:}
\theoremindent3\parindent

\newcounter{hyp}
\newtheorem*{hypinner}{H{$_{\thehyp}$}}
\newenvironment{hyp}{\refstepcounter{hyp}\hypinner}{\endhypinner}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\begin{hyp}
This is a test hypothesis, test test test test test test test test stuff test
test, this is a fairly long test hypothesis, test test test test test test.
\end{hyp}
\lipsum[1]

\end{document}