These forums are CLOSED. Please visit the new forums HERE
checking a sentance for a certian set of words |
|
|
RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
|
05-22-2006 15:30
Is it possable to have a listen script listen for a set of 3 words in a particular order, reguardless of where they are in a sentance?
|
|
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
|
05-22-2006 15:55
Yes.
llSubStringIndex() string lookfor = "zim ka zoom"; string lookin = "Did someone say zim ka zoom?" llSubString(lookin, lookfor) would return 17. It would return -1 if the string was not found. _____________________
|
|
RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
|
05-22-2006 17:01
so any number that is non negative would set it off, cuz it will always be negative if its now found?
|
|
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
|
05-22-2006 17:07
No -- that number is the index of the match. So:
CODE
-1 simply means that there was no find. _____________________
|
|
RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
|
05-22-2006 17:41
oops, I meant not found,,,typo...bleh
Is there a way I can make it not case sensative.... NM found it...durp |
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
05-22-2006 17:53
you can fake it by using llToUpper, or llToLower
|