SRL Archive - SRL Bugs

StrInArr


Kyle Undefined

2011-11-08 22:31:30

I was doing some string tests and I used this function at one part. The text I was searching for was in the string but it was still returning False.

I copied the function to my script to debug it and I found an issue when it does the Pos(); call.


if Pos(Str, arrS[I]) > 0 then
Exit;

Should really be

if Pos(arrS[I], Str) > 0 then
Exit;

As that's the correct parameter order. Hope this is fixed soon, so I'll just use my function till it is.

Nava2

2011-11-08 22:35:42

Nope, its right. You're using it wrong!

You want ArrInStr. :)

Kyle Undefined

2011-11-08 22:39:41

Thanks, I was reading it wrong lol.

/thread