Gamestudio Links
Zorro Links
Newest Posts
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
NOMAX undeclared identifier.
by Petra. 01/09/26 21:12
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (kzhao), 3,777 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joe_kane, Namitha_NN, Syndrela, agasior, mosfet
19189 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
TEXT array #149446
08/21/07 12:27
08/21/07 12:27
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
I would like to know if I could create one array of TEXT ana how I could do this.

Thanks
Amadeu

Re: TEXT array [Re: amadeu] #149447
08/21/07 13:17
08/21/07 13:17
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
TEXT* textArray[10];
Creates an array of empty text pointers. Now you have to create 10 texts and make the pointers in the array point to them:
Code:

for(i = 0; i < 10; i++)
{
textArray[i] = txt_create(1,1);
}


Then you can use them like this:
(textArray[3])->pos_x = 100;

Re: TEXT array [Re: Excessus] #149448
08/21/07 14:31
08/21/07 14:31
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
Hallo,
Thanks.
I create this function to create TEXT:
TEXT* Lteste[10];
STRING* Lname = "name";
function ArrangeLabel()
{
Lteste[0] = txt_create(1,2);
(Lteste[0])->pos_x = 10;
(Lteste[0])->pos_y = 10;
(Lteste[0])->strings = Lname;
(Lteste[0])->flags = VISIBLE;
(Lteste[0])->green = 0;
(Lteste[0])->blue = 0;
(Lteste[0])->red = 0;
}

I put the function ArrangeLabel() in the main function but did not appears the TEXT "name" when I rum the game. Why? Something is wrong in my code?

Re: TEXT array [Re: amadeu] #149449
08/21/07 14:35
08/21/07 14:35
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Yes,

This:
(Lteste[0])->strings = Lname;

should be this:
((Lteste[0])->(pstring[0])) = Lname;

strings gives the amount of strings in the text; it is a var. pstring is an array of string pointers, where you can put your strings in the text.

Re: TEXT array [Re: Excessus] #149450
08/21/07 15:12
08/21/07 15:12
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
hi

I put this command ((Lteste[0])->(pstring[0])) = Lname;
but appeared syntax error. What could I do?

Re: TEXT array [Re: amadeu] #149451
08/21/07 17:06
08/21/07 17:06
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Sorry, it is: ((Lteste[0])->pstring)[0] = Lname

Re: TEXT array [Re: Excessus] #149452
08/21/07 19:00
08/21/07 19:00
Joined: Aug 2006
Posts: 78
A
amadeu Offline OP
Junior Member
amadeu  Offline OP
Junior Member
A

Joined: Aug 2006
Posts: 78
thx


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