Find string in array
#1

Hi!

I'm trying to make a chat with a bot and I don't know how to find a string inside an array, for example:

Quote:

new Chat[4][128] =
{
"hi",
"how are you?",
"hello",
"ajsdknjsd"
};

if(strfind(text, SEARCH_ARRAY_OF_ANSWERS) != -1) <- I want to check the "Chat" array for the possible answers a player can make. I dont wanna be full of "if" or "elses"

Anyone got a clue?
Reply


Messages In This Thread
Find string in array - by clavador - 05.06.2010, 05:27
Re: Find string in array - by clavador - 05.06.2010, 07:20
Re: Find string in array - by DJDhan - 05.06.2010, 07:36
Re: Find string in array - by Calgon - 05.06.2010, 07:40
Re: Find string in array - by RyDeR` - 05.06.2010, 08:39
Re: Find string in array - by clavador - 05.06.2010, 14:25

Forum Jump:


Users browsing this thread: 1 Guest(s)