The Daily Click ::. Forums ::. Klik Coding Help ::. List searching
 

Post Reply  Post Oekaki 
 

Posted By Message

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
22nd October, 2007 at 19:40:43 -

How would I run a one line check to see if a string is within my List object? I'm trying to use that SearchString function but I don't get what that flag bit is all about.

Basically I just need it to give an answer of 0 if the string isn't in the whole list, or 1 if it is in the list.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
22nd October, 2007 at 20:01:17 -

or you could create about the most basic function in any language; searching a list for a string, manually;

Run a loop for the duration of the list object + 1, and retrieve the loop position value from the list, and compare it to the string you wanted. If it appears, break the loop and return a yes, and if it reaches the loop position of the size of the list object, return 0.

Image Edited by the Author.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
22nd October, 2007 at 20:05:05 -

Lets give that a whirl then!

Edit: Bingo! It worked, cheers loads for that!

Image Edited by the Author.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com
   

Post Reply



 



Advertisement

Worth A Click