Text object and variables [Solved]

For questions about using Classic.

Post » Sat Feb 26, 2011 3:35 pm

I am cutting down on all the text objects in my game, so I use this code so one text object can hold more information.

Example - crashes the game.
[code:3odn6azh]
set text to global('global1') & global('global2')[/code:3odn6azh]

Example - game and string/variables load.
[code:3odn6azh]
set text to global('global1') & INI_1.ItemString("1", "1") & global('global2')[/code:3odn6azh]

Is there a way to display two variables first with no text in between them?
B
3
S
1
G
2
Posts: 14
Reputation: 853

Post » Sat Feb 26, 2011 10:28 pm

if you explicitly convert the values to strings it won't crash.
ex.
str(global('global1')) & str(global('global2'))
B
88
S
30
G
89
Posts: 5,113
Reputation: 60,337

Post » Sun Feb 27, 2011 2:24 pm

Thank you. Problem solved.
B
3
S
1
G
2
Posts: 14
Reputation: 853


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests