Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-08-2002, 01:07 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
tokenize3

there should be a tokenize3 command that tokenizes without tokenizing with spaces.


ie: tokenize3 |,bob|went to the|market;

token1=bob
token2=went to the
token3=market
Reply With Quote
  #2  
Old 08-08-2002, 04:33 AM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
Er, future improvements?



But it sounds good.
__________________

Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.

-Kaimetsu
Reply With Quote
  #3  
Old 08-09-2002, 12:14 AM
zorakid2001 zorakid2001 is offline
Banned
Join Date: Jul 2002
Location: Oregon USA <-- this place sux0rs
Posts: 113
zorakid2001 is on a distinguished road
Send a message via ICQ to zorakid2001 Send a message via AIM to zorakid2001
WTF?? i dont understand
Reply With Quote
  #4  
Old 08-09-2002, 12:14 AM
zorakid2001 zorakid2001 is offline
Banned
Join Date: Jul 2002
Location: Oregon USA <-- this place sux0rs
Posts: 113
zorakid2001 is on a distinguished road
Send a message via ICQ to zorakid2001 Send a message via AIM to zorakid2001
oh now i do sorry for being a retard
Reply With Quote
  #5  
Old 08-09-2002, 12:33 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
you could just have the string be like "bob" "went to" "the market"
0 - bob
1 - went to
2 - the market
Reply With Quote
  #6  
Old 08-09-2002, 04:27 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Except tokenize "bob" "went to" "the market" returns
"bob"
"went
to"
"the
market"
is his point
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #7  
Old 08-09-2002, 04:37 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Tyhm
Except tokenize "bob" "went to" "the market" returns
"bob"
"went
to"
"the
market"
is his point
Last I checked when you tokened something in quotes, it took everything inside the quotes as 1 token, I'll check again just to make sure later =/
Reply With Quote
  #8  
Old 08-09-2002, 05:59 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Quote:
Originally posted by Python523

Last I checked when you tokened something in quotes, it took everything inside the quotes as 1 token, I'll check again just to make sure later =/
I think so too.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #9  
Old 08-09-2002, 02:51 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
eek

i have this script



if (actionserverside) {
with (getplayer(#p(0))) {
setstring client.test,#p(1);
}
}
//#CLIENTSIDE
if (playerchats && startswith(-,#c)) {
triggeractoin 0,0,serverside,test,"#a,#e(1,-1,#c)";
}

then when i parse the string, it messes up if you have a " within your message

Xx

i dont know why i posted that Xx


i would like to see tokenize3
__________________
[signature]insert here[/signature]
Reply With Quote
  #10  
Old 08-10-2002, 10:12 PM
MysticHasteP2P_2 MysticHasteP2P_2 is offline
Registered User
Join Date: Jun 2002
Location: Down under
Posts: 137
MysticHasteP2P_2 is on a distinguished road
Anything within " & " Is a token so:

Bob "went to the" market
tokens being
1-bob
2-went to the
3-market
__________________
MysticHaste/Dlaiyre Rain
Reply With Quote
  #11  
Old 08-11-2002, 11:07 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
why not use tokenize2?

tokenize2 delims,str; - divides str into tokens, using 'delims' as additional delimiters

example:
tokenize2 $,Bob$went to the$market;

that will return a token for each one
#t(0) = Bob
#t(1) = went to the
#t(2) = market

Why add tokenize3 that does the samething as tokenize2? Delims, as indicated from the commands.rtf is the delimiter you want the command to use to seperate each word in the string. If you make delims blank then yes, each space in str will be the cutoff point each time it occurs.
__________________
Reply With Quote
  #12  
Old 08-11-2002, 10:42 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
Quote:
Originally posted by G_yoshi
why not use tokenize2?

tokenize2 delims,str; - divides str into tokens, using 'delims' as additional delimiters

example:
tokenize2 $,Bob$went to the$market;

that will return a token for each one
#t(0) = Bob
#t(1) = went to the
#t(2) = market

Why add tokenize3 that does the samething as tokenize2? Delims, as indicated from the commands.rtf is the delimiter you want the command to use to seperate each word in the string. If you make delims blank then yes, each space in str will be the cutoff point each time it occurs.
Nope, tokenize2 always has spaces and commas as default delims. so tokenize2 $,Bob$went to the$market;
would come out
0: Bob
1: went
2: to
3: the
4: market

Tokenize 3 might be useful...but you can easily get around the spaces with quotes....i use them all the time, for things like the on screen radio, it used wraptext, everything was just quoted though. It should work fine.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #13  
Old 08-11-2002, 11:29 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by mikepg


Nope, tokenize2 always has spaces and commas as default delims. so tokenize2 $,Bob$went to the$market;
would come out
0: Bob
1: went
2: to
3: the
4: market

Tokenize 3 might be useful...but you can easily get around the spaces with quotes....i use them all the time, for things like the on screen radio, it used wraptext, everything was just quoted though. It should work fine.
you specify 'delims' as the delimiter, did you not read the command description?

divides str into tokens, using 'delims' as additional `delimiters
__________________
Reply With Quote
  #14  
Old 08-12-2002, 12:06 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by G_yoshi


you specify 'delims' as the delimiter, did you not read the command description?

divides str into tokens, using 'delims' as additional `delimiters
Case rested.
__________________

subliminal message: 1+1=3
Reply With Quote
  #15  
Old 08-12-2002, 11:58 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Falcor


Case rested.
Eh?

I just fail to see the reason to duplicate an existing command. If it fails to work properly, then post it in the bugs forum Maybe Stefan will go back and make sure it works for the next release
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.