ID:147912
 
Can someone please explain to me why this:

mob/verb/FTTest()
if(findtext(" hi","hi")==1)
usr <<"Found 'hi' in ' hi'!"
else
usr << "Search 'hi' in ' hi' failed.."

Fails?
If you switch it around to use == 0 instead like this:

mob/verb/FTTest()
if(findtext(" hi","hi")==0)
usr << "Search 'hi' in ' hi' failed.."
else
usr <<"Found 'hi' in ' hi'!"

It works, but then switch the == 0 back to 1 and you get the same result. I think it stops searching if a space is added. Can anyone tell me a way around this? It would be appriciated.

James
A quick look in the reference reveals

Returns:
The position of T2 in T1; 0 if not found.

The position of "hi" in " hi" is 2 not 1 therefore everything did work out fine.
In response to Theodis
I see, thanks..