Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | chip programmers | 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