Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-28-2006, 10:48 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
A lil help w/ Substrings

Well.. heres whats up:
makevar("test." @ tokens[0]) = "hi";
tokens[0] contains of test.a=B

so I would need it to look like this:
makevar("test.a") = "B"; (test.a = B)

Normally I could just substirng it, but the tokens could always change. How can I detect where the = is and get the content before and after the sign?

Thanks.
Reply With Quote
  #2  
Old 06-29-2006, 12:50 AM
JustBreathe JustBreathe is offline
Registered User
Join Date: Jun 2006
Posts: 59
JustBreathe is on a distinguished road
temp.a = "temp.b = 3";
echo( temp.a.substring( 0 , temp.a.pos("=") ) );

? Might that what you be searching for?
Reply With Quote
  #3  
Old 06-29-2006, 04:43 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by JustBreathe
temp.a = "temp.b = 3";
echo( temp.a.substring( 0 , temp.a.pos("=") ) );

? Might that what you be searching for?
Thanks a ton, never knew about the pos command.
Reply With Quote
  #4  
Old 07-05-2006, 08:16 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by KuJi
Thanks a ton, never knew about the pos command.
Such the wiki my friend
(pos() is a function also ;o)
__________________
Do it with a DON!
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 01:39 AM.


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