Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to access a certain string of a text? #406232
08/15/12 14:14
08/15/12 14:14
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
I know this question sounds simple, but i just didn't make it to work... So, i have a TEXT with multiple strings and i want to access a certain one. This code represents what i want:

Code:
TEXT* my_text= 
{
//
strings=50;
//
}

function test()
{
handle=media_play(my_txt.string[1],NULL,100); 
}



All i want is to access the first string of the array, then the second, the third, and so on. The manual says:
"If the text contains more than one string, individual strings can be accessed through a [] index suffix, just like variable arrays." ...But obviously i don't know the exact way to do that.
Help pls.

Re: How to access a certain string of a text? [Re: mEnTaL] #406234
08/15/12 14:34
08/15/12 14:34
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hi!
Code:
(my_txt.pstring)[index]



Salud!

Re: How to access a certain string of a text? [Re: txesmi] #406240
08/15/12 16:49
08/15/12 16:49
Joined: Jul 2009
Posts: 96
M
mEnTaL Offline OP
Junior Member
mEnTaL  Offline OP
Junior Member
M

Joined: Jul 2009
Posts: 96
Thanks, buddy


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1