Setting Text box text to number variable

Get help using Construct 2

Post » Sat May 27, 2017 1:09 am

hi there im making a text box that has 3 local variables
min - value - max
and what i want to do is every tick set value to textbox.text
so then i can compare it with max and if its higher set value to max

the problem i have is it saying that i cant set a number variable to text even tho the text box is set to numbers.

hope someone can help me
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Sat May 27, 2017 4:55 am

Parse number as text: str(NumVariable)
Parse text as number: int(TextVariable)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sat May 27, 2017 11:08 pm

thank you, i think i understand that instead of textbox.text its int(textbox.text)
B
19
S
6
Posts: 143
Reputation: 1,835


Return to How do I....?

Who is online

Users browsing this forum: chrisinfinger, Google [Bot], YoHoho and 15 guests