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
2 registered members (AndrewAMD, TipmyPip), 13,353 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
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