Creating a level up system

Trying to create a basic level up system but greater than function seems not to be working. The LEVEL Label goes up even when not greater than the CURRENT EXP Label. Bad coding or bug maybe?

Thunkableblocks design

1 Like

Instead of using label's text try using variables

1 Like

I started with variables and had the same issue, so I simplified it like this to see what was happening.

1 Like

Okay the variables seem to be working now

2 Likes

@Garry_Lane hard to say without seeing your component tree here too, but is there a difference between your lvl label and the lvl value? (And exp label/exp value?)

1 Like

Take the value from the label and multiply it by one. So it will become a number and the logic will work.

1 Like

@Garry_Lane you are trying to compare text to text and therefore the system will check character by character. For example, comparing text will result in “20” is greater than “100” because “2” is greater than “1”. The system will only compare the second character if the first character does not satisfy the condition.

To compare the values in text labels you need to convert them first to numbers then compare them so you have to add 0 to both sides of the valuation condition to be treated as numbers.

6 Likes