Hi everyone,
depending on entered numbers (coming from a simple Label
) a calculation is going on within a Timer
node to determine the timer duration.
...
var entered_numbers = get_node(the_entered_numbers).text
result_for_timer_duration = 3600 / float (entered_numbers)
set_wait_time(result_for_counter_duration)
start(result_for_counter_duration)
func _on_Timer_timeout():
print ("timeout")
So this prints in the „rhythm“, slowly or quickly, depending on the entered numbers.
What I want is another Label
to +1 on every timeout, so I added a Label
as a child to the Timer
node („AddUpLabel“) and after the print this line of code:
$AddUpLabel.text += 1
which throws the error: Invalid operands 'String' and 'int' in operator '+'.
What am I missing here?