Thread: tokenize
View Single Post
  #6  
Old 09-21-2006, 08:45 AM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by Stefan View Post
Yes the exact translation from tokenize from GS1 to GS2 is
tokens = player.chat.tokenize();

Your example could be like this (to make it as short as possible):
clientr.randomstring = player.chat.tokenize()[1];
Another way of tokenizing in GS2 (tokenize2 ,; ) is:

tokens = player.chat.tokenize( "_");

If I'd say hi_lol_how_are_you
tokens would be { "hi", "lol", "how", "are", "you"}.
tokens[ 3] would get "are", tokens[ 0] would get "hi".
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote