Printing an array

For questions about using Classic.

Post » Sat Jan 15, 2011 7:28 am

Hey guys.

What would be the best way to print an array into a text object?

For instance, if I have an array where (1,1) is "Hello ", (2,1) is "my name is" and (3,1) is " John.", I'd get "Hello my name is John." in the text object.

Here is my crappy attempt, but it doesn't work at all...

http://dl.dropbox.com/u/1378330/TA000001.cap
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Sat Jan 15, 2011 10:50 am

[code:10n9lqyn]+ System: Start of layout
-> Array: Set index 1 to "Hello."
-> Array: Set index 2 to "My name is Inigo Montoya."
-> Array: Set index 3 to "You killed my father."
-> Array: Set index 4 to "Prepare to die."
+ Array: For Each element
-> Text: Set text to Text.Text&NewLine&Array (Array.CurrentX)[/code:10n9lqyn]
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests