Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (Grant, AndrewAMD, BrainSailor), 21,981 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MaliceTheMaker, Haitao_Ren, JimSimons, julienp, julienper
19248 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