Posted By
|
Message
|
Zi-Xiao
Registered 29/07/2002
Points 537
|
7th June, 2003 at 16:00:59 -
I'm using TGF. I know there's a built in function in MMF but I don't like to use MMF. So does anyone know how to get the length of a string in TGF?
n/a
|
Pete Nattress Cheesy Bits img src/uploads/sccheesegif
Registered 23/09/2002
Points 4811
|
7th June, 2003 at 16:08:05 -
find half it's length, and double it.
and on the subject of your avatar (noticing the plea in your sig), you may want to actually upload it. it's reading "not found" on the server.
www.thenatflap.co.uk
|
Zi-Xiao
Registered 29/07/2002
Points 537
|
7th June, 2003 at 17:15:54 -
ok... how do i find half the length?
n/a
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
7th June, 2003 at 18:20:44 -
Im not sure about TGF, but there is a get len (len = length) feature.
Len( string$( "Cash" ) )
Your code should look something like that, this expression will return 4, because "Cash" is four characters long.
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
|
Mark Beazley
Registered 02/01/2002
Points 766
|
10th June, 2003 at 04:56:39 -
Len( string$( "Cash" ) ) will not work as you are converting a string to a string its just Len("cash")
www.gethyper.co.uk
|
Shen Possibly Insane
Registered 14/05/2002
Points 3497
|
10th June, 2003 at 05:06:19 -
String Parser can find a length in TGF.
gone fishin'
|
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
|
10th June, 2003 at 05:10:00 -
Oops yep sorry, i copied that from a example that i was doing, and i wasn't concentrating.
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
|
Long John Kickbag
Registered 26/08/2002
Points 148
|
10th June, 2003 at 12:47:14 -
The string$ function doesn't convert numbers to strings, that's str$, string$ gets the alterable string of a string object so it would work, providing that string existed.
Resize! - www.clicksplat.com/comparison.html
|
Zapper
Registered 05/02/2003
Points 435
|
10th June, 2003 at 13:05:50 -
I know one way:
Pull the string straight and mesaure it with a ruler!
Im so sorry I just couldn't resist =
n/a
|
ShadowCaster Possibly Insane
Registered 02/01/2002
Points 2203
|
11th June, 2003 at 02:13:05 -
Len() gets the length of a string in the expression editor if your using MMF. If you dont have MMF you'll need to download the String Parser object (as was previously mentioned) which can be done from www.pluginx.com (Plugin Central).
Mike
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
|
|
|