Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,507 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
string-arrays #103335
12/21/06 17:09
12/21/06 17:09
Joined: Nov 2004
Posts: 888
B
beegee Offline OP
User
beegee  Offline OP
User
B

Joined: Nov 2004
Posts: 888
Kurze Frage, wie siehts eigentlich mit String-Arrays aus? Wurde schon über eine Implementation in einem der folgenden Updates darüber nachgedacht?

Danke!


Fratch - Newer statistics panel for GameStudio
Re: string-arrays [Re: beegee] #103336
12/21/06 17:34
12/21/06 17:34
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Handbuch -> TEXT -> String-Arrays.

Re: string-arrays [Re: jcl] #103337
12/21/06 17:40
12/21/06 17:40
Joined: Nov 2004
Posts: 888
B
beegee Offline OP
User
beegee  Offline OP
User
B

Joined: Nov 2004
Posts: 888
Problem:The strings will be displayed one under each other in a specific distance.


Fratch - Newer statistics panel for GameStudio
Re: string-arrays [Re: beegee] #103338
12/21/06 17:44
12/21/06 17:44
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
You are not supposed to make the text visible. Just use it as container for multiple strings.

You can access them by using my_text.string[j] and use them for whatever you want.

Re: string-arrays [Re: FBL] #103339
12/22/06 13:09
12/22/06 13:09
Joined: Nov 2004
Posts: 888
B
beegee Offline OP
User
beegee  Offline OP
User
B

Joined: Nov 2004
Posts: 888
Yes, but i think this is not very fast. Plus, from time to time perhaps I have two display string-arrays, but not as an text and not with this distance.


Fratch - Newer statistics panel for GameStudio
Re: string-arrays [Re: beegee] #103340
12/22/06 15:00
12/22/06 15:00
Joined: Feb 2006
Posts: 324
Germany
M
maybenew Offline
Senior Member
maybenew  Offline
Senior Member
M

Joined: Feb 2006
Posts: 324
Germany
a string array is a string array... it doesnt matter if it is a component of the TEXT-object, the speed is the same...

if you have to display elements of the array create another text and assign certain entries in the array to the new text-object...

Re: string-arrays [Re: maybenew] #103341
12/22/06 17:19
12/22/06 17:19
Joined: Nov 2004
Posts: 888
B
beegee Offline OP
User
beegee  Offline OP
User
B

Joined: Nov 2004
Posts: 888
Hello I don't want to display it with texts. And this is 200% difficulter than C++,no not with me. All these detours(umwege). Why not just declaring it?


Fratch - Newer statistics panel for GameStudio
Re: string-arrays [Re: beegee] #103342
12/22/06 17:48
12/22/06 17:48
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Because it is not possible with C-Script, as it has been already mentioned about 100 times.

You'll have to wait for Lite-C.
Using the text workaround will do no harm - it won't be slower than a normal string array either.

Re: string-arrays [Re: FBL] #103343
12/22/06 17:54
12/22/06 17:54
Joined: Nov 2004
Posts: 888
B
beegee Offline OP
User
beegee  Offline OP
User
B

Joined: Nov 2004
Posts: 888
Okay, thanks much!


Fratch - Newer statistics panel for GameStudio
Re: string-arrays [Re: beegee] #103344
12/23/06 10:13
12/23/06 10:13
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Full stop.

You are allowed to have string arrays in a real "array" manner. Just do it like this:

Code:

var s_array [100];

//creates the string structures inside the array

var i;
while (i < 100) {
s_array[i] = str_create("#128");
i += 1;
}

//destroys the string structures of the array

var i;
string* sPnt_temp;
while (i < 100) {
sPnt_temp = s_array[i];
str_remove(sPnt_temp);
s_array[i] = 0;
i += 1;
}



and then you can use it like this:

Code:

str_cpy(s_array[5], "test123");
error(s_Array[5]); //returns "test123"



Last edited by HeelX; 12/23/06 10:14.
Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

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