The Daily Click ::. Forums ::. Klik Coding Help ::. String Parser
 

Post Reply  Post Oekaki 
 

Posted By Message

Activ8games



Registered
  02/07/2003
Points
  463
10th January, 2004 at 16:37:31 -

I need help using the string parser object in my current project. I was told it can read a list of numbers by setting "," as delimeter and then extracting bits of text.

However, I can't figure out how to use it at all aside from setting the delimeter. Can someone help me out?

 
Vote Quimby!!!

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
10th January, 2004 at 17:54:39 -

k.

You can set the source string - the string to get the bits of string out of. Then to get one, use 'Get Substring' under the List Tokenizing menu. Anything else?

 
gone fishin'

Activ8games



Registered
  02/07/2003
Points
  463
10th January, 2004 at 18:17:30 -

Im still having no luck. I set the source string and delimeters at the start of the frame. Then upon pressing enter i told it to add the first element to a list. It was a simple test.

Still, nothing appeared on the list. I also forgt, I am using string parser 1... not 2.

Sorry if im dragging this out too much.

 
Vote Quimby!!!

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
10th January, 2004 at 18:29:18 -

The problem is that at the start of the frame the source string will be null, or whatever is in the textbox at the start of the frame. You need to change it so when you press enter the source string is changed to the textbox's contents and then add the first element to a list.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Activ8games



Registered
  02/07/2003
Points
  463
10th January, 2004 at 20:00:19 -

I tried what you said and still no results. I dont understand what i could be missing here.

 
Vote Quimby!!!

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
11th January, 2004 at 03:30:17 -

Start of frame:
* Set string parser value to "12,23,34,45"
* Set delimiter ","

Button pressed:
* Add line to list with lget$( "String parser", 1 )

This sets it to 12. I'm not sure whqt you're doing wrong.

 
gone fishin'

Activ8games



Registered
  02/07/2003
Points
  463
11th January, 2004 at 11:58:13 -

Whenever I type 'lget$...' into the expression editor I get a syntax error.

 
Vote Quimby!!!

Rycon



Registered
  20/09/2002
Points
  996
11th January, 2004 at 18:33:37 -

Add line str$( "String parser", 1 )

Ive never used the string parser object, but thats my guess.

 
We are the music makers, we are the dreamers of dreams...

Activ8games



Registered
  02/07/2003
Points
  463
11th January, 2004 at 18:37:35 -

Actually, that was my immediate reaction when the attempt failed. It didn't work either. Maybe I should post the program for someone to look at instead on continuing with this pointless discussion. Does anyone want to take a look at it?

 
Vote Quimby!!!

Crystal Clear (H.E.S)

Possibly Insane

Registered
  06/10/2002
Points
  2548
11th January, 2004 at 21:47:31 -

String Parser object is perfect for MOO games, thats how i learn what it actually does. goto www.togerworks.co.uk, and download hes MooClick game example.
it shows you how to use Delimeters on String Parser 2 object.

 
HES homepage:
http://www.distinctiv-efair.com/heretic/studios
Crystal Clear Productions: http://www.distinctiv-efair.com/heretic/crystalclear

Deleted User
12th January, 2004 at 01:42:14 -

Togerworks? lolz, There is a typo. www.tigerworks.co.uk

 
   

Post Reply



 



Advertisement

Worth A Click